[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [FWP] sifting



Bennett Todd wrote:
> 
> 	my @categories = qw(ALPHA BETA);
> 	my($pat) = qr(@{[join('|', @categories)]});


	my $pat = do { local $" = '|'; qr(@categories) };

Or, of course:

	sub make_pat(@) { local $" = '|'; qr(@_) }
	my $pat = make_pat @categories;

-- 
John Porter


==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe