:) use Anonymous::Monk; no ESP;
References quick reference
You can only get scalars using the arrow syntax, you cant get multiple values
my $sth = { NAME_uc => [ 1 .. 2 ] };
print join "\n" , $sth->{NAME_uc}[0 ,1 ];
__END__
2
my $sth = { NAME_uc => [ 1 .. 2 ] };
print join "\n" , @$sth->{NAME_uc}[0 ,1 ];
__END__
Not an ARRAY reference at - line 3.
That is why you need curlies
my $sth = { NAME_uc => [ 1 .. 2 ] };
print join "\n" , @{ $sth->{NAME_uc} } [0 ,1 ];
__END__
1
2
The arrow-less way
my $sth = { NAME_uc => [ 1 .. 2 ] };
print join "\n" , @{ $$sth{NAME_uc} } ,''
__END__
1
2
References quick reference |