in reply to Matching with 'if' inside a 'for' loop

You should carefully study the source code of working scripts for examples of looping and matching, you will learn a lot! In the meantime pay close attention to the difference between this and your original code which lacked the 'if' condition:
foreach my $ref (@records){ if($ref=~/URL/){ print qq(<B>Webpage: </B><A HREF="$ref">$ref</A><br>); } }

Replies are listed 'Best First'.
Re: Re: if
by malaga (Pilgrim) on Feb 14, 2001 at 00:11 UTC
    i know it. i was trying to follow other scripts, but i wasn't able to apply it here. sorry bout that. i still get confused sometimes when i'm dealing with hashes, especially when i'm being rushed, which i am. thanks.