Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: String Literals in Perl

by Anonymous Monk
on Dec 05, 2001 at 21:34 UTC ( #129670=note: print w/ replies, xml ) Need Help??


in reply to String Literals in Perl

hello\cZathis is a test  


Comment on Re: String Literals in Perl
Re: String Literals in Perl
by Anonymous Monk on Jul 27, 2006 at 08:39 UTC
    'hi\there' #has eight characters and represents "hi\there"
    shouldn't be:
    hi<tab here>here <--- with the tab inside?

      The perl string literal 'hi\there' has 8 characters: h, i, \, t, h, e, r, e

      The perl string literal "hi\there" has 7 characters: h, i, <Tab>, h, e, r, e

      -- Hofmator

      'hi\there' #has eight characters and represents"hi\there"

      was confusing so I updated it to:

      'hi\there' #has eight characters and represents"hi\\there" (one \ in the string)

      More importantly, however:

      'blah\\blah' #has ten characters and represents "blah\\blah"

      was incorrect so I updated it to

      'blah\\blah' #has nine characters and represents "blah\\blah" (one \ in the string)

      Thanks for the note. Next time, please don't remove the "Re^X:" from the front of the title.

      - tye        

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (18)
As of 2015-07-01 15:23 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 (5 votes), past polls