One possibility is that your regexp isn't matching anything in the $1 group. Specifically, if your file contains a line like:
: FOO!
the match will succeed-- but with $1 undefined. The fix for this depends on what you want the code to do with lines formatted this way. Try making the * into a +, or making the whole thing greedy (although greed isn't always good; that'll break on lines like
Foo: bar:baz
where you get $1 = "Foo: bar" and $2 = "baz").
In reply to Re: uninitialized value in hash element Error
by Anonymous Monk
in thread uninitialized value in hash element Error
by Dru
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |