Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: use of uninitialized value

by hdb (Parson)
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>) { ...


Comment on Re: use of uninitialized value
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (15)
As of 2014-08-01 16:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Who would be the most fun to work for?















    Results (32 votes), past polls