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

Re: use of uninitialized value

by hdb (Monsignor)
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 chanting in the Monastery: (8)
As of 2017-08-21 12:49 GMT
Find Nodes?
    Voting Booth?
    Who is your favorite scientist and why?

    Results (323 votes). Check out past polls.