note
Eily
<p>I'll have to remember to upvote that one when I get a new load of votes :).</p>
<p>You can make the bad_hash straightaway with [map] :
<code>my %isBad= map { $_ => 1 } qw/
www.yahoo.com
www.google.com
www.comcast.com
/;
</code>
Which would be <code> my %isBad = map { $_ => 1 } @sites;</code> for [tevus_oriley]. And with the hash values being 1, you can just write <c>if ( $isBad{$www} )</c> instead of <c>if (exists $isBad{$www})</c></p>
<p>Edit : Whoops, posted too fast, chomp returns the number of chomped elements, not the chomped list.</p>
1040631
1040653