Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Building a data structure - %HoH, %HoA?

by Jenda (Abbot)
on Nov 02, 2012 at 10:18 UTC ( #1001941=note: print w/ replies, xml ) Need Help??


in reply to Building a data structure - %HoH, %HoA?

(my $team, my $loc, my $tool, my $amt) = (split /[,]/)[1,2,3,4];
should be
my ($team, $loc, $tool, $amt) = (split /[,]/)[0,1,2,3];
or
my ($team, $loc, $tool, $amt) = split /[,]/;

The index of the first element of an array/list is 0, not 1!

Jenda
Enoch was right!
Enjoy the last years of Rome.


Comment on Re: Building a data structure - %HoH, %HoA?
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (8)
As of 2014-09-17 13:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (79 votes), past polls