in reply to Comparing file contents to array values

late guess :
my $number_to_guess = X ; map { $_ =~ /^(\d{10})/ ; $number_to_guess == $1 and die $_ } @row ;
OK. maybe thats not the way to do it.

Replies are listed 'Best First'.
Re: Re: simple for some
by Sihal (Pilgrim) on Nov 22, 2002 at 20:37 UTC
    Or maybe :
    my $number_to_guess = X ; my %stuff ; map { $_ =~ /^\d{10}(.*)/ ; $stuff{$_} = $1 ; } @row ; } @rows; print $stuff{$number_to_guess} ;
    Or maybe not