needperlhelp has asked for the wisdom of the Perl Monks concerning the following question:
Can some one explain what is that i miss in this code@l_tmp = (1,2,3,4); $l_ref = \@l_tmp; print $$l_ref[0]; # This works , by printing 1 $l_ref = \(1,2,3,4); print $$l_ref[0]; # This fails ( prints nothing )
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Reference on List & Arrays Difference
by shmem (Chancellor) on Mar 11, 2007 at 09:50 UTC | |
by Anno (Deacon) on Mar 11, 2007 at 12:58 UTC | |
by shmem (Chancellor) on Mar 11, 2007 at 14:05 UTC | |
by Anno (Deacon) on Mar 11, 2007 at 15:22 UTC | |
by jwkrahn (Abbot) on Mar 11, 2007 at 22:08 UTC | |
|
Re: Reference on List & Arrays Difference
by Anonymous Monk on Mar 11, 2007 at 09:42 UTC |