Perl: the Markov chain saw | |
PerlMonks |
Re: writtings files to a new folderby MaxKlokan (Monk) |
on Jan 24, 2007 at 09:40 UTC ( [id://596225]=note: print w/replies, xml ) | Need Help?? |
For a beginner my solution is perhaps too cryptic, but I am going to give it anyway, just in case somebody finds it interesting. You can do it all with a single command if you use grep, which can be used to apply a block of statements to all elements in a list : The default variable $_ is set to each element of the list and the operator -f can work with it. $! is the error message if an error has indeed occurred.
In Section
Seekers of Perl Wisdom
|
|