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 ?   

Sorry, but I find it pretty difficult to work out what you are asking
from that. You refer to a "regex" but I see no sign of any regex, and
"this cribs in cmd execution and o/p bangs!" lost me completely. A
small, self contained example script (SSCE) that illustrated your
problem and that I could cut and paste, and run on my box might have
been more useful.

My best guess from reading your post several times is that you are
asking about quoting. If so, check out the quoting operators in 'perldoc
perlop', probably qq. If not, please feel free to try again, especially
with the SSCE.

HTH

-- 
Brian Raven 

-----------------------------------------------------------------------------------------------------------
This e-mail may contain confidential and/or privileged information. If you are 
not the intended recipient or have received this e-mail in error, please advise 
the sender immediately by reply e-mail and delete this message and any 
attachments without retaining a copy. Any unauthorised copying, disclosure or 
distribution of the material in this e-mail is strictly forbidden.


_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to