http://qs321.pair.com?node_id=596039


in reply to Passing input through a hash then displaying results

You probably would want to do something like the following:
my $grade = <STDIN>; my %scores = ( "90" => "A", "80" => "B", "70" => "C", "60" => "D", "50" => "F"); my $letter_score = $scores{$grade}; if ($letter_score eq "A"){ #return this }

There is really no need to loop to lookup key/value pairs. I hope this helps. If you're trying to execute statements you may want to look into the eval function.
s;;5776?12321=10609$d=9409:12100$xx;;s;(\d*);push @_,$1;eg;map{print chr(sqrt($_))."\n"} @_;