pavunkumar has asked for the wisdom of the Perl Monks concerning the following question:
Like, above I want to assign these elements into one @new_array. Is there any way to achieve in one line(step)$arr_ref = ( [ 1,2,3 ] ) ; @array = @$arr_ref ; #Now, @array has those three elements . @arr_ref_new = ( [1],[2],[3,4] ) ;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Converting array reference to list context
by ikegami (Patriarch) on Dec 31, 2010 at 06:10 UTC | |
|
Re: Converting array reference to list context
by AnomalousMonk (Archbishop) on Dec 31, 2010 at 19:16 UTC | |
by GrandFather (Saint) on Jan 01, 2011 at 03:58 UTC | |
|
Re: Converting array reference to list context
by Anonymous Monk on Dec 31, 2010 at 06:00 UTC |