Perl-Sensitive Sunglasses | |
PerlMonks |
how to redirect output in different filesby utpalmtbi (Acolyte) |
on Jun 14, 2013 at 06:30 UTC ( [id://1038899]=perlquestion: print w/replies, xml ) | Need Help?? |
utpalmtbi has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks..
I am trying to replace characters in file through perl regex like :
I have to run this script for all the files in my folder so I use following command described previously in this forum as for %f in (*.txt) do @yourscript.pl %fIt works fine but I want to save the output generated by each input file in a subfolder. For example if my current folder contains the files named list1.txt, list2.txt etc.. an 'outfile' subfolder should generate and the results for each file shouls ve saved in it as out1.txt, out2.txt etc.. But I don't know how to do that..Plz help
Back to
Seekers of Perl Wisdom
|
|