[Gllug] Regexp
Simon Wilcox
simonw at simonwilcox.co.uk
Thu Mar 7 15:38:49 UTC 2002
On Thu, 7 Mar 2002, Jackson, Harry wrote:
> Hi all
>
> I am currently parsing a file using Perl and was wondering if I can use
> Arrays in the regexp. For instance
You can't but you can do:
@name = ("arr","add");
$test = '(' . join('|', at name) . ')';
if /^$test\s$test$/;
blah blah
Simon.
--
"2 to the power of 100,000 to 1 and falling...."
--
Gllug mailing list - Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug
More information about the GLLUG
mailing list