in reply to \q quote-matching operator

You could use the single-quote as your -e delimiter. :-)

But, I do like your \q idea for matching quotes. (With the \Q non-quote characterclass, as well.) Go ahead and suggest it!

------
We are the carpenters and bricklayers of the Information Age.

Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose

I shouldn't have to say this, but any code, unless otherwise stated, is untested

Replies are listed 'Best First'.
Re^2: \q quote-matching operator
by diotalevi (Canon) on Aug 26, 2004 at 13:15 UTC

    \Q is used as the marker for quotemeta().

    / ... \Q$something\E ... /
Re^2: \q quote-matching operator
by Ven'Tatsu (Deacon) on Aug 26, 2004 at 13:45 UTC
    You could use the single-quote as your -e delimiter. :-)
    You can? I seem to have trouble trying to do that.
    C:\>perl -e 'print "foo\n"' Can't find string terminator "'" anywhere before EOF at -e line 1.
    In cmd.exe you can escape quotes with either a quote or a backslash, I don't know if either will work in command.com, If some one else doesn't know I'll check after I get home from work both do apear to work in command.com on Windows 98.
    C:\>perl -e "print '""'" " C:\>perl -e "print '\"'" "