tkn has asked for the wisdom of the Perl Monks concerning the following question:
sub edit() { $file = $File::Find::name; if ($file=~/$thecode\.csv/i) { print "CSV File : $File::Find::name\n"; print "$file"; $CSV_file = $File::Find::name; } } if ($rim1_thecode ne "") { ##generate RIM1 csv file## open (CSVIN, "<$CSV_file") or die "Can't open $CSV_file: $!\n"; $outcsv_file = $rim1_thecode."\.csv"; open (CSVOUT, ">$outcsv_file") or die "Can't open $outcsv_file: $!\ +n"; @lines=<CSVIN>; for $line(@lines) { ##substitute $thecode with RIM1 transaction code## $line =~ s/$thecode/$rim1_thecode/; print CSVOUT $line; } close CSVIN; close CSVOUT; }
Edited by Chady -- added code tags.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: generate new files
by McDarren (Abbot) on Jan 07, 2006 at 04:32 UTC | |
|
Re: generate new files
by ambrus (Abbot) on Jan 07, 2006 at 13:49 UTC | |
|
Re: generate new files
by McDarren (Abbot) on Jan 08, 2006 at 16:06 UTC |