in reply to Re: Perl: how to insert words at the end of each line and open the file?
in thread Perl: how to insert words at the end of each line and open the file?
Thank you for guidance. I keep the library names in an array and try to open each of them to do further editing. It seems I cannot open the file directly using file handle. I will be very much appreciate if you shed light on this.Thanks.
while ($line = <CF>) { @arr2 = @empty_arr; if ($line =~ /(\S+)/) { $libn = "$1.lib"; #print "$libn\n"; push (@arr2,$libn); #print "@arr2\n"; } } foreach $libn (@arr2) { open (VI,"$libn") || die "ERROR: can't read $libn\n"; #print"$libn\n"; if ($line =~ m/(Car code:)((.*))/) { $a = $line; .... .. }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Perl: how to insert words at the end of each line and open the file?
by Anonymous Monk on Nov 01, 2013 at 02:48 UTC | |
by WWq (Novice) on Nov 01, 2013 at 08:19 UTC |