Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2018-06-22 05:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?



    Results (121 votes). Check out past polls.

    Notices?