in reply to Converting an Array Reference into an Array
Shows this as a result:my $aryref=[ qw(one two) ]; my @array=@$aryref; my @arraytwo=qw(one two);
LISTOP (0x8115698) leave [1] OP (0x8120b78) enter COP (0x8115658) nextstate BINOP (0x8115630) sassign UNOP (0x81795e0) srefgen UNOP (0x8120cd8) null [141] LISTOP (0x8120340) anonlist OP (0x8120cb8) pushmark SVOP (0x811a068) const PV (0x811d8e4) "one" SVOP (0x81203c0) const PV (0x811d8d8) "two" OP (0x814db90) padsv [1] COP (0x81157d0) nextstate BINOP (0x8115770) aassign [4] UNOP (0x8115728) null [141] OP (0x8115750) pushmark UNOP (0x81156c0) rv2av [3] OP (0x8179600) padsv [1] UNOP (0x81156e0) null [141] OP (0x8115708) pushmark OP (0x81795c0) padav [2] COP (0x8120b38) nextstate BINOP (0x8120b10) aassign [6] UNOP (0x8120a80) null [141] OP (0x8120aa8) pushmark SVOP (0x8120a40) const PV (0x811d908) "one" SVOP (0x8120a60) const PV (0x811d8f0) "two" UNOP (0x8120ac8) null [141] OP (0x8120af0) pushmark OP (0x8115810) padav [5] cloning.pl syntax OK
However, I would try and get used to the 'ugly syntax' of references and dereferencing them - they are among the most powerful features of Perl and are the only way of building complex data structures. You will need them :)
Update: Stopped lying. :)
CU
Robartes-
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Converting an Array Reference into an Array
by chromatic (Archbishop) on Mar 12, 2003 at 08:01 UTC | |
|
Re: Re: Converting an Array Reference into an Array
by PodMaster (Abbot) on Mar 12, 2003 at 08:01 UTC |