Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^2: Perl: how to insert words at the end of each line and open the file?

by WWq (Novice)
on Nov 01, 2013 at 02:39 UTC ( #1060689=note: print w/ replies, xml ) Need Help??


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; .... .. }


Comment on Re^2: Perl: how to insert words at the end of each line and open the file?
Download Code
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
      Thank you.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1060689]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (7)
As of 2015-07-30 02:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (269 votes), past polls