Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
...And when @sorted goes out of scope, I'll have returned a reference to an anonymous array - but that is so ugly! Is there a quick and lovely way to write it in a single expression?my @sorted = sort @stuff; return \@sorted;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Reference to sort results
by FunkyMonk (Bishop) on Aug 05, 2009 at 12:04 UTC | |
|
Re: Reference to sort results
by Marshall (Canon) on Aug 05, 2009 at 12:18 UTC | |
by Anonymous Monk on Aug 05, 2009 at 13:19 UTC | |
by ssandv (Hermit) on Aug 05, 2009 at 15:22 UTC | |
by Anonymous Monk on Aug 06, 2009 at 10:42 UTC | |
by ssandv (Hermit) on Aug 06, 2009 at 15:18 UTC | |
by Marshall (Canon) on Aug 07, 2009 at 00:09 UTC | |
by omnifish (Initiate) on Aug 10, 2009 at 09:45 UTC | |
by Anonymous Monk on Aug 05, 2009 at 13:23 UTC | |
|
Re: Reference to sort results
by Anonymous Monk on Aug 05, 2009 at 12:05 UTC | |
by Marshall (Canon) on Aug 05, 2009 at 12:34 UTC |