in reply to Retrieve only what I need from split without using temp array
The + force the evaluation on the right-hand side and then we just access the 3rd element from the list returned by split.my $foo = 'foo,bar,baz'; print +(split ',' => $foo)[2], $/; __output__ baz
_________
broquaint
|
|---|