Created
March 29, 2016 12:35
-
-
Save oliwer/631465c0d35b03b86d61 to your computer and use it in GitHub Desktop.
Mini-implémentation de stat en perl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
# | |
# Retourne la date de dernière modifications d'un fichier | |
# sous forme de timestamp. | |
# | |
use strict; | |
use warnings; | |
my $filename = shift @ARGV or | |
die "usage: $0 <filename>\n"; | |
my @st = stat $filename or | |
die "stat '$filename': $!\n"; | |
print $st[9]."\n"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment