Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re: use of uninitialized value

by hdb (Prior)
on Jul 01, 2013 at 09:16 UTC ( #1041787=note: print w/replies, xml ) Need Help??

in reply to use of uninitialized value

You seem to want to populate the arrays @a and @b with the data from your file. But you declare them within the loop over the lines of your file. So for every line you read you create new versions of these arrays and forget all information from previous lines. This is surely not what you want. To make your data persistent across the lines of your file, you need to declare common structures before you enter the loop.

my @a; my @b; while (<FILE>) { ...

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1041787]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2017-04-28 10:28 GMT
Find Nodes?
    Voting Booth?
    I'm a fool:

    Results (520 votes). Check out past polls.