perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mario Toro <mt...@movilgate.com>
Subject Help: Migrating from embperl 1.3 to Embperl 2
Date Thu, 29 Apr 2010 21:04:28 GMT
Hello,

How can do a perl regular expresion for search and replace blocks like

        [+ command1 ; command2; command3 +]
with

       [+ do { command1 ; command2; command3 } +]

We try with some like this :

cat file.epl |perl -na -e'if ($_ =~ m/\[\+( *.+? *)\+\]/g ){ print "
do {$1}\n"} ;'

But code like [+ $output +]  is replaced with [+ do {$output} +] too ...

Thanks and regards,
-- 
Mario F. Toro
--

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Mime
View raw message