For greater convenience (and much greater visual clarity), hash and array values may be interpolated directly into double-quotish things.qq(<option value=").$_->{value} . qq(">) . $_->{ label } . qq(</option +> )
>perl -wMstrict -le "my @AoH = ( { number => 1, spelled => 'one', }, { number => 2, spelled => 'two', }, { number => 3, spelled => 'three', }, ); for my $hashref (@AoH) { print qq{$hashref->{number} is spelled $hashref->{spelled}}; } print ''; for my $i (0 .. $#AoH) { print qq{$AoH[$i]->{number} is spelled $AoH[$i]->{spelled}}; } " 1 is spelled one 2 is spelled two 3 is spelled three 1 is spelled one 2 is spelled two 3 is spelled three
In reply to Re: Specifying array indexes in select list.
by AnomalousMonk
in thread Specifying array indexes in select list.
by enkomeks
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |