lakssreedhar has asked for the wisdom of the Perl Monks concerning the following question:
i have a perl program written for a file in a folder.i want to run this for all files in that folder. the code i have written doesnt seem to work
#!/usr/bin/perl @files = glob("$ARGV[0]/*"); foreach $f (@files) { $cmd="perl addclause.pl < $f "; system($cmd); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: run a perl script for all files in a folder
by Corion (Patriarch) on Aug 06, 2012 at 11:04 UTC | |
|
Re: run a perl script for all files in a folder
by 2teez (Vicar) on Aug 06, 2012 at 11:58 UTC | |
|
Re: run a perl script for all files in a folder
by aaron_baugher (Curate) on Aug 06, 2012 at 13:01 UTC | |
by lakssreedhar (Acolyte) on Aug 08, 2012 at 05:45 UTC | |
by lakssreedhar (Acolyte) on Aug 08, 2012 at 05:49 UTC | |
|
Re: run a perl script for all files in a folder
by klightsey (Initiate) on Mar 19, 2019 at 16:53 UTC |