
Laurent_R
Veteran
/ Moderator
Sep 10, 2013, 8:46 AM
Post #5 of 5
(2939 views)
|
if(/name="ann(\d)">(.*?)<\/li>/) { This probably does not work because you don't have a ">" right after "ann1', "ann2", etc.
if($1 == "1") { $anns{"ann1"} = $2; } Either do a numeric comparison:
if($1 == 1) { $anns{"ann1"} = $2; } or do a string comparison:
if($1 eq "1") { $anns{"ann1"} = $2; } mixing the two might give you some trouble. This holds also for the other comparisons. BTW, if you had used strictures, you would have had a warning about this. Always put "use strict;" and "use warnings;" at the top of your programs.
|