Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re: Single Quotes - how to avoid any escape processing?

by temporal (Pilgrim)
on Jan 31, 2013 at 20:59 UTC ( #1016392=note: print w/replies, xml ) Need Help??

in reply to Single Quotes - how to avoid any escape processing?

Thanks for the replies guys.

Yes, it would appear that (for the Googlers) this is not possible.
At least not in any simple, straightforward method that I was hoping for.

ww, I did check out that section of the PerlDocs - it told me about what I was expecting.
However the reread led me to this (appropriately christened!) section of the same doc which definitively spells everything out about this case, and many others not even considered in this node:

This is one of the rare cases where Perl's DWIM philosophy doesn't align with my own, oh well.

A (basic) note - the selected delimiter for q{} is always vulnerable and needful of and being escaped. As you'd expect.

And thanks for the quality snippets LanX, that is probably what I'd end up doing if I had a long list. Fortunately, this time I was just curious about that case =)
Hehe, I certainly don't blame Perl for MS monkey business. The scary part is that I'm starting to get used to it. Boy, sometimes I miss my last position where I worked primarily with Linux-based systems ;)

Of course, moritz offers another good solution for larger volumes of data as well ♥

So thanks again monks.
Hopefully this node will stand as an answer, of sorts (heh, ww =D )

Strange things are afoot at the Circle-K.

Replies are listed 'Best First'.
Re^2: Single Quotes - how to avoid any escape processing?
by BillKSmith (Prior) on Jan 31, 2013 at 21:40 UTC

    Things get even worse when you windows path includes whitespace. (e.g. c:\Documents and Settings\.....). Windows requires quotes around the path. Those quotes must be part of the perl string. The section of documentation that you just cited has everything you need to know, but it is not easy.


      Oh yeah, fun stuff. I think at that point I'd start using one of the path parsing/porting modules to handle it all.

      iirc File::Path and File::Basename intelligently handle paths with spaces on Windows.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2019-12-05 19:38 GMT
Find Nodes?
    Voting Booth?
    Strict and warnings: which comes first?

    Results (151 votes). Check out past polls.