On Wed, 18 Sep 2002 11:24:45 -0400 Arie Folger <[EMAIL PROTECTED]> wrote: > [afolger@localhost afolger]$ perl -e ' > > $_ = "abcdefg"; > > s/bc(?{if (/e/){$a = "hi"}else{$a = "HI"}})e/bc${a}e/; > > print $_."\n"; > > '
You used the default delimiter '/', but it appears within your expression: if (/e So obviously perl complains about bad termination/balancing: > Sequence (?{...}) not terminated or not {}-balanced at -e line 3, within Either backslash it or replace the delimiter with something else. I'm not sure I get what you try to do. Looks like you search for 'bce' so the if() will be always true... s/bce/bchie/; > Thanks 1000^2, You meant 1000**2 :-) ---------------------------------------------------------------- Oron Peled Voice/Fax: +972-4-8228492 [EMAIL PROTECTED] http://www.actcom.co.il/~oron 3Com only purchased rights to the numbers '3' '5' and '9', Intel owns '4', '8', '6', and '2'. '0' and '1' are still in the public domain ;-) -Donald Becker
msg21926/pgp00000.pgp
Description: PGP signature