The stupid question is the question not asked | |
PerlMonks |
Re: Using system (); with Strawberry Perlby kcott (Archbishop) |
on Nov 25, 2021 at 05:54 UTC ( [id://11139101]=note: print w/replies, xml ) | Need Help?? |
G'day hadrons, Welcome to the Monastery. As already pointed out, there are incompatibilities between Unix commands, MS commands and Perl functions; e.g. rm (Unix), erase (MS), unlink (Perl). If speed is all-important, you may have to write separate name.sh and name.bat scripts. Perl can do everything in your examples without system. For instance, take a look at open which has examples of reading from and writing to files; glob which can expand wild cards like *.xml; and the core File::Copy module which has a move() function. Your description of "File::Grep" is not the way to go here (even if it does have some basis in fact). You've provided no code, no context, and no Benchmark! Instead, you should provide those things and ask us how you might improve speed efficiency. I've never used File::Grep so I just looked it up: it's 16 years old; a better option may have been produced since it was written. — Ken
In Section
Seekers of Perl Wisdom
|
|