in reply to Re: quotewords and qq{}/q{}
in thread quotewords and qq{}/q{}

Is your user input coming at you as a perl expression to be evaled, or does q{} or qq{} get evaluated in the user's process before you see it?

The way I read his post, neither. It looks to me like users are supplying data that he wants to parse, but they want to supply it with Perl-style quoting constructs, probably for the obvious reason that Perl-style quoting constructs eliminate most of the worst problems with escaping quote characters in short bits of quoted text.

OTOH, if we knew more about long_story, it is possible that there is another, possibly even a better, solution.

-- 
We're working on a six-year set of freely redistributable Vacation Bible School materials.

Replies are listed 'Best First'.
Re^2: quotewords and qq{}/q{}
by greatdane (Beadle) on Jan 31, 2007 at 02:12 UTC
    Thanks for all the feedback. You are all correct. My users are inputting a string to be split like a shell. Yet, there is a complication since the user's input would also like CPP pre-processing which will not modify things within quotes. For this reason, I would like to provide the users a method for quoting without quotes (e.g. qq{} or q{}). These operators would allow CPP to perform substitutions which is great. Yet, afterwards, I would continue to want to "parse" the input string like a shell using something like "quotewords".