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.

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 having an uproarious good time at the Monastery: (5)
As of 2016-06-25 06:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (323 votes). Check out past polls.