Hi,
I want to be able to be to use a regex in a couple of places, and rather
than simply copy it I would like to setup a constant and use this.

So I would like to be able to write something like

       use constant PRIVATE_RANGE => "/^(10\.|192\.)/";


       if ( $addr =~ PRIVATE_RANGE )


Any ideas?

I know the regex doesn't give me a complete or accurate private address
range but you get the idea.

Thanks


 
==================
Trevor Goddard
Senior Developer
Avecho
Colchester
UK


 
____________________________________________________________________ 
 -avecho- |  GlassWall  |  certified virus free  | -www.avecho.com-
_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to