good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: need help on declaring variablesby Thilosophy (Curate) |
on Mar 03, 2008 at 06:48 UTC ( [id://671583]=note: print w/replies, xml ) | Need Help?? |
but it gave me some error
Hmm. Did it give you an error message to go along with the error? The error seems to stem from here: You suspect $1 and $2. Do they contain the value you think they should (add some debug output)? When using regular expressions, you should check if there actually was a match.
In Section
Seekers of Perl Wisdom
|
|