(prints 4)#!/usr/bin/perl use strict; use warnings; my @array = qw/21 33 5 49 235 40/; my @index = grep {$array[$_] == 235} 0..$#array; print "@index\n";
In reply to Re: Array search
by Cristoforo
in thread Array search
by th206
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |