Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: quotes in Perl

by TheEnigma (Pilgrim)
on Oct 20, 2004 at 19:10 UTC ( [id://401011]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to quotes in Perl

Well done!

You might want to add, however, that with q, qq, and qw, delimiters other than parentheses can be used. [] and {} will work, as will just about any punctuation mark, I believe. Then, to use your delimiter within the quoted string, the rule would be: escape whatever your delimiter is.

TheEnigma

Replies are listed 'Best First'.
Re^2: quotes in Perl
by apotheon (Deacon) on Oct 20, 2004 at 19:20 UTC
    I knew I'd forget something. Thanks for the reminder. I'll get right on that.

    - apotheon
    CopyWrite Chad Perrin
Re^2: quotes in Perl
by revdiablo (Prior) on Oct 21, 2004 at 01:07 UTC
    just about any punctuation mark

    Actually, you can use almost any character, not just punctuation. The only thing is, with alpha delimiters, you need a space between the operator and the delimiter. This can be used for all manner of nefarious purposes. Quick example:

    $_ = qq qHelloq; s sHss; print y yyyc;

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://401011]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.