Chas. Owens wrote:
On Sun, May 4, 2008 at 1:45 AM, Gunnar Hjalmarsson <[EMAIL PROTECTED]> wrote:
snip
if ($string =~/^$match | $match | $match$/g){
snip
my $match = qr(\b1\b);
snip
Ah, I was missing something, the spaces. This is much better than my answer.
I think this is even safer:
my $match = qr"(?:^|\s)1(?:\s|$)";
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/