in reply to Re: How to match a ;
in thread How to match a ;

The regex of the OP will evaluate true for all strings except a string consisting of a single ';' character optionally followed by a newline because  $line !~ m{^;$} uses the  !~ negating binding operator.

Update: corrected per GrandFather's reply below.

Replies are listed 'Best First'.
Re^3: How to match a ;
by GrandFather (Saint) on Feb 08, 2009 at 10:02 UTC

    Argh! Quite right. It must be the heat here!

    Well, any string except one containing a single ';' optionally followed by a \n.


    Perl's payment curve coincides with its learning curve.