Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
if ( exists $list{$location} ) { my $value = $list{$location}; $value++; $list{$location} = $value; } elsif ( $list{$location} eq "" ) { if ( exists $list{Unknown} ) { my $value = $list{Unknown}; $value++; $list{Unknown} = $value; } } else { $list{Unknown} = "1"; } else { $list{$location} = "1"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Looping structure
by pg (Canon) on Nov 28, 2003 at 02:33 UTC | |
|
Re: Looping structure
by Roger (Parson) on Nov 28, 2003 at 04:29 UTC | |
|
Re: Looping structure
by The Mad Hatter (Priest) on Nov 28, 2003 at 02:36 UTC | |
|
Re: Looping structure
by sunadmn (Curate) on Nov 28, 2003 at 04:10 UTC | |
|
Re: Looping structure
by chanio (Priest) on Nov 28, 2003 at 17:52 UTC |