in reply to How to match a ;
You also need to make sure that $line is clean of final new lines whitespace, otherwise your regex won't match your line because $line will end in a new line whitespace instead of ';' - see http://perldoc.perl.org/functions/chomp.html. Also you might consider /^;\s*$/ to strip trailing whitespace.
Syntax wise, your regex is fine.
Best, beth
Update:Correction (see jwkrahn and Grandfather below).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to match a ;
by GrandFather (Saint) on Feb 08, 2009 at 09:06 UTC | |
by AnomalousMonk (Archbishop) on Feb 08, 2009 at 10:20 UTC | |
by ELISHEVA (Prior) on Feb 08, 2009 at 10:29 UTC | |
by johngg (Canon) on Feb 08, 2009 at 23:13 UTC | |
by GrandFather (Saint) on Feb 09, 2009 at 00:41 UTC | |
|
Re^2: How to match a ;
by jwkrahn (Abbot) on Feb 08, 2009 at 08:58 UTC |