Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
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
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 studying the Monastery: (14)
As of 2014-12-22 18:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (126 votes), past polls