Another variation on the "quality scoring" hash:
c:\@Work\Perl\monks>perl -wMstrict -le "use List::Util qw(reduce); ;; my %quality = qw(WPA2 4 WPA 3 WEP128 2 WEP64 1); ;; my @available = qw(WPA WPA2 WEP128); my $best_available = reduce { $quality{$a} > $quality{$b} ? $a : $b } + @available; print qq{'$best_available' is best available}; " 'WPA2' is best available
In reply to Re: Search an array for values sequentially
by AnomalousMonk
in thread Search an array for values sequentially
by Doozer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |