Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: foreach in array

by injunjoel (Priest)
on Jul 24, 2008 at 00:04 UTC ( #699730=note: print w/replies, xml ) Need Help??


in reply to foreach in array

Greetings, I would suspect its a problem with how you are reading the lines in... try this
while(<JOE>){ push @data,$_; }
rather than
while(<JOE>){ @data = <JOE>; }
I think the while is shifting off the first element and thus you are getting what is left in @data.

-InjunJoel
"I do not feel obliged to believe that the same God who endowed us with sense, reason and intellect has intended us to forego their use." -Galileo

Replies are listed 'Best First'.
Re^2: foreach in array
by wade (Pilgrim) on Jul 24, 2008 at 00:13 UTC

    ++injunjoel, I was going to point this (the double use of <JOE>) out if you hadn't.

    --
    Wade

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (5)
As of 2016-09-29 06:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (548 votes). Check out past polls.