I personally prefer the second option. Is there any other implication to this. I guess both are same.my $string = "zero one two three"; # from the list $number = (split /\s/, $string)[1]; # This is with anonynmous array $number = [ split /\s/, $string ]->[1];
-T
Title edit by tye
In reply to coding style suggestion: (...)[1] vs. [...]->[1] by thens
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |