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

Is there any reason you are dereferencing your ref hash with a hash slice of one element?
@{$ref}{qw/URL/}
is just a convoluted way of saying:
$ref->{URL}
There may be some tricks to be played by returning a singleton list instead of a scalar, but I don't think you're looking for anything of that sort.
   MeowChow                                   
               s aamecha.s a..a\u$&owag.print

Replies are listed 'Best First'.
Re^2: if
by tadman (Prior) on Feb 14, 2001 at 02:21 UTC
    I swear there's a book somewhere teaching people a Bondage and Discipline version of Perl. This convoluted access syntax has shown up time after time in posts.

    Instead, make it all cute and fluffy with curly braces:      @{${ref}}{map{qw{URL}}} Just kidding
Re: Re: if
by malaga (Pilgrim) on Feb 14, 2001 at 00:55 UTC
    i knew that, and the code started out that way, but at a certain point i decided to leave it open for more than one field in each print line. but it doesn't make sense to me now and i just went in and changed them all. thanks.