Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
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 imbibing at the Monastery: (4)
As of 2015-07-30 02:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (269 votes), past polls