@a = (12, 18, 56, 76, 99); $in = <STDIN>; for(0..$#a){ $i = $_ if $in == $a[$_]; } $i == 0 ? print "not found\n" : print "found at $i\n";
In reply to Re^5: Finding target unspecified value
by Lennotoecom
in thread Finding target unspecified value
by Latnam
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |