p sena wrote:
> Hi,
> 
> Can someone pls shed me some light>>
> I have a func --
> sub get_formatStr {
>     my $formatStr = '"%xxxx#%yyyy#%zzzzz"';
>     return $formatStr;
> }
> where in above, %xxx, %yyy & %zzz are literals & all three being delimeted by 
> '#' and the combination should always be enclosed by double quotes.
> I have to use this string in a regex as below-
> $cmd = "$prog -o $formatStr $queryStr"; ## first $cmd
> But this cribs in cmd execution and o/p bangs!
> However $cmd = "$prog -o \"%lxxxx#%yyyy#%zzzzz\" $queryStr"; ## second $cmd.
> works fine & supplies expected o/p.no issues with $queryStr too. Now, problem 
> arises when I use the first $cmd. Is there any way (built in funcs or 
> tekniks) where in I can use the first $cmd and still get the good o/p as from 
> second $cmd ?

Try: my $formatStr = '\\"%xxxx#%yyyy#%zzzzz\\"';
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to