if you tested negative for corion's explanation which is usually the case(people usually tend to open a file that does not exists), try this:
i always use grep or map when going through arrays or hashes, try it, it's a lot of fun !#!/usr/bin/perl use strict; my @array = qw(q e t u o); while(<DATA>){ chomp(my $r = $_); grep{print "$_\n" if ($r =~ /$_/g)}@array; } __DATA__ ff qksjnfji klksnsd jkksdjen rjkaa
cheers
In reply to Re: Regex and array
by baxy77bax
in thread Regex and array
by Deus Ex
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |