The stupid question is the question not asked | |
PerlMonks |
Re: parsing hmtl file with regexby Marshall (Canon) |
on Oct 01, 2011 at 07:10 UTC ( [id://929000]=note: print w/replies, xml ) | Need Help?? |
I try to avoid the use of $1, $2 etc. I find it better and easier as far as the coding, to put the left hand side of the regex match into a list context and for example assign $catalog_num directly instead of fiddling with $1! Update: When writing if statements like above, you have to consider "truth-ness". $catalog_num is false if that value is undefined or it is numeric zero. And that's a "Bad Line!"
In Section
Seekers of Perl Wisdom
|
|