in reply to regex question Underscores, lines and paratheses.

In short:

] and - are special in character classes.

As rules of thumb avoiding ambiguity°:

If needed ...

update

D:\>perl -dE0 Loading DB routines from perl5db.pl version 1.49_05 Editor support available. Enter h or 'h h' for help, or 'perldoc perldebug' for more help. DB<1> say "$_:\t", $_ =~ /[]abc-]/ for qw/] [ - a/ ]: 1 [: -: 1 a: 1 DB<2>

°) Otherwise ] will close the class and - will denote a range.

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery FootballPerl is like chess, only without the dice