Hi, I am trying to implement a conditional regexp by inserting perl code in a regexp, as per the perlre man page, but am having no success. Anybody know how to fix the code below?
[afolger@localhost afolger]$ perl -e ' > $_ = "abcdefg"; > s/bc(?{if (/e/){$a = "hi"}else{$a = "HI"}})e/bc${a}e/; > print $_."\n"; > ' Sequence (?{...}) not terminated or not {}-balanced at -e line 3, within pattern Sequence (?{...}) not terminated or not {}-balanced before HERE mark in regex m/bc(?{ << HERE if (/ at -e line 3. [afolger@localhost afolger]$ Thanks 1000^2, Arie Folger -- It is absurd to seek to give an account of the matter to a man who cannot himself give an account of anything; for insofar as he is already like this, such a man is no better than a vegetable. -- Book IV of Aristotle's Metaphysics ================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]