Im pretty new to scripting with perl and i have a problem with stat and i don't understand why its not working..
The error is: Use of uninitialized value $mtime in string at test.pl line 10.The error shown points to print.
#!/usr/local/bin/perl -w use strict; use warnings; use File::stat; my $filename = "test.txt"; my $mtime = (stat $filename)[9]; print $mtime;
I just wanted to simply display the timestamp of that file
Thanks in advance
MichaelIn reply to Problem with file::stat by mr19
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |