Skip to content

Instantly share code, notes, and snippets.

@oliwer
Created March 29, 2016 12:35
Show Gist options
  • Save oliwer/631465c0d35b03b86d61 to your computer and use it in GitHub Desktop.
Save oliwer/631465c0d35b03b86d61 to your computer and use it in GitHub Desktop.
Mini-implémentation de stat en perl
#!/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