Your skill will accomplish what the force of many cannot |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Dear monks,
I'm looking for a shortcut to extract a specific element out of an array without using a temporary variable. The array is returned by a function and I only need a particular element of that. Since a line of code is worth 2000 lines of plain (gibberish) text (of mine), here is what I do: Only I want to do it shorter. Something like: which obviously doesn't work. Thanks, mrd PS: I could wrap function() in another function that returns the element I want from a local array. But that's just too much work :) PPS: I'm sure it's been discussed before but I can't seem to come up with an adequate search expression. In reply to Looking for syntactic shortcut by mrd
|
|