Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^5: Perl oddities

by hardburn (Abbot)
on Mar 01, 2005 at 16:18 UTC ( #435506=note: print w/ replies, xml ) Need Help??


in reply to Re^4: Perl oddities
in thread Perl oddities

Quoting is not an identity function in Perl.

"There is no shame in being self-taught, only in not trying to learn in the first place." -- Atrus, Myst: The Book of D'ni.


Comment on Re^5: Perl oddities
Re^6: Perl oddities
by Anonymous Monk on Mar 01, 2005 at 16:49 UTC
    Quoting is not an identity function in Perl.

    It's not, but if you're going to use them as hash keys, they get quoted anyway:

    perl -MDevel::Peek -e '$a = 1; Dump ($a); %a = map +{$_}, $a; Dump ($a +)' SV = IV(0x8192edc) at 0x8191dc4 REFCNT = 1 FLAGS = (IOK,pIOK) IV = 1 SV = PVIV(0x8184888) at 0x8191dc4 REFCNT = 1 FLAGS = (IOK,POK,pIOK,pPOK) IV = 1 PV = 0x818b5b8 "1"\0 CUR = 1 LEN = 2

    perl -MDevel::Peek -e '$a = 1; Dump ($a); %a = map {"$_",}, $a; Dump ( +$a)' SV = IV(0x8192edc) at 0x8191dc4 REFCNT = 1 FLAGS = (IOK,pIOK) IV = 1 SV = PVIV(0x8184888) at 0x8191dc4 REFCNT = 1 FLAGS = (IOK,POK,pIOK,pPOK) IV = 1 PV = 0x818b5b8 "1"\0 CUR = 1 LEN = 2
    No difference.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (12)
As of 2015-07-07 15:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (90 votes), past polls