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

Try replacing qw with q or just single quotes. qw is used to return a list of words, and q is equivalent to using single quotes. Also, because we're looking for a single element in the hash, you don't need the hash slice notation. Now we have:
for my $ref ( @records ) { if ( $ref->{'URL'} ) { print qq(<B>Webpage:</B>) . qq(<A HREF="$ref->{'URL'}">$ref->{'URL'}</A><br>); } }

--sacked