lackita has asked for the wisdom of the Perl Monks concerning the following question:
my @arr = ref( $x ) eq 'ARRAY' ? @$x : ( $x );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: elegant array assignment
by grinder (Bishop) on Feb 15, 2008 at 22:20 UTC | |
by kyle (Abbot) on Feb 15, 2008 at 22:48 UTC | |
|
Re: elegant array assignment
by pc88mxer (Vicar) on Feb 15, 2008 at 20:26 UTC | |
|
Re: elegant array assignment
by dragonchild (Archbishop) on Feb 16, 2008 at 03:33 UTC | |
|
Re: elegant array assignment
by kyle (Abbot) on Feb 15, 2008 at 21:04 UTC | |
|
Re: elegant array assignment
by salva (Canon) on Feb 15, 2008 at 22:56 UTC | |
|
Re: elegant array assignment
by snoopy (Curate) on Feb 16, 2008 at 00:08 UTC |