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

Re^2: Perl5 Internal Representation of string variable

by flexvault (Prior)
on Oct 02, 2010 at 16:54 UTC ( #863086=note: print w/ replies, xml ) Need Help??


in reply to Re: Perl5 Internal Representation of string variable
in thread Perl5 Internal Representation of string variable

Okay, now I'm confused at a higher level!

My understanding of the perl scalar is the same as you describe, so is it the s/// operator that requires backslash characters?

Thank you


Comment on Re^2: Perl5 Internal Representation of string variable
Download Code
Re^3: Perl5 Internal Representation of string variable
by Marshall (Prior) on Oct 02, 2010 at 18:22 UTC
    You need the backslash \, when the following character has a special meaning. Whether that is required or not is context dependent. In a regex you have to backslash the [ character because that character has a special meaning in a regex. But in a print statement this is not necessary.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (11)
As of 2015-07-02 04:24 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 (27 votes), past polls