|No such thing as a small change|
File::Find seems grossly inefficient for performing simple file tasksby taint (Chaplain)
|on Apr 26, 2013 at 06:27 UTC||Need Help??|
taint has asked for the
wisdom of the Perl Monks concerning the following question:
In an effort to figure out how to perform the equivalent of this shell script:
using Perl. I made use of one of the Perl utilities, find2perl. After reading it's syntax, I used what I understood to be the equivalent:
-- with 2 exceptions;
1) I added -iname '*.xz'
2) I was unable to define time in minutes, as only -ctime is available, which == day(s).
I had expected a similarly short equivalent to be returned upon execution. But much to my surprise, I received the following:
Is this right?!
I'm not going to pretend to be a Perl GURU -- far from it. But even after removing the comments, this seems to inefficient -- no?
Anyway, if this is really the best option to perform such a short task in a shell with Perl. It looks to me that "shelling out" within Perl is more efficient -- minus Taint, of course.
Thank you for any consideration in this matter.
#!/usr/bin/perl -Tw use perl::always; my $perl_version = "5.12.4"; print $perl_version;