Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Efficiency of $$var, ${$var}

by stefp (Vicar)
on Aug 20, 2001 at 22:16 UTC ( [id://106285]=note: print w/replies, xml ) Need Help??


in reply to Efficiency of $$var, ${$var}

$${a} and $$a compile to the same stuff. The first expressions contains more tokens so it takes longer to parse but you parse it only once (admittedly per script execution) But the real point is that is also more difficult to read.
# perl -MO=Concise,-exec -e '$$a' 1 <0> enter 2 <;> nextstate(main 1 -e:1) v 3 <$> gvsv(*a) s 4 <1> rv2sv vK/1 5 <@> leave[t1] vKP/REFC -e syntax OK perl -MO=Concise,-exec -e '${$a}' 1 <0> enter 2 <;> nextstate(main 2 -e:1) v 3 <$> gvsv(*a) s 4 <1> rv2sv vK/1 5 <@> leave[t1] vKP/REFC -e syntax OK

-- stefp

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://106285]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (9)
As of 2024-04-18 13:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found