Hi, On Fri, 21 May 2004, Matthias Keller wrote:
> Thanks for the advice. > I found some documentation about it (never seen that ?! before :) ) > BUT my perl seems to refuse those constructs...? > I'm using Version 5.8.1 and when I do something like: > perl -ne "print if /([a-z]+)\s+(?!\1\b)/" > it produces: > > bash: !\1\b: event not found > > So I guess my perl is too old or something like this?? No, it's probably due to quoting problems with "!" in your shell. In bash, you need to backslash the !, such as: perl -ne "print if /([a-z]+)\s+(?\!\1\b)/" or put the perl code in single quotes: perl -ne 'print if /([a-z]+)\s+(?!\1\b)/' hth, -- Bob
