Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: process a file and reading a line and passing the values to another sub function

by LanX (Chancellor)
on Dec 12, 2012 at 16:28 UTC ( #1008524=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download

  1. or download this
     $line = <FILE>;                 #  <---------- 35
        # this line doesn't work. don't know what's wrong here..
  2. or download this
      @buf = <FILE>;                     # you reading all lines of FILE i
    +nto @buf
      foreach $line (@buf) {             # OK! (well, "my $line" would be 
         $line = <FILE>;                 # but now reading again a single 
    +line !?! 
                                         #     which is  undef after EOF

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (12)
As of 2015-12-01 09:59 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (798 votes), past polls