|go ahead... be a heretic|
In -X FILEHANDLE, how to derive the -C of all files in a $dir variable?by taint (Chaplain)
|on Apr 27, 2013 at 01:43 UTC||Need Help??|
taint has asked for the
wisdom of the Perl Monks concerning the following question:
I've been struggling with an attempt to clobber symlinks in a folder, if they are older than N minutes.
After much work with File::Find, I found that I am unable to make it work. SO, I decided to look to perlfunc's -X (-C in this case). which will return the Creation-time, which I can compare to Current-time. Allowing me to clobber anything older than 11 minutes from now.
Problem is, I'm not smart enough to figure out to how list the files Creation-time with perlfunc's -C. Looking at How do I delete... get's me close. But does mtime (modified) == ctime?
I could get close:
Never mind the example above, it doesn't work, it returns:
Would anyone be willing to provide an example, please?
Thank you for all your consideration
#!/usr/bin/perl -Tw use perl::always; my $perl_version = "5.12.4"; print $perl_version;