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

Re: [MacPerl] REgular Expression for IP address



On Sun, 13 Feb 2000 14:17:37 GMT, Bart Lateur wrote:

>If you want alternative delimiters, prefix the pattern with "m". 
>
>  @IPN = split m|\.|, $1;   # m|PATTERN|

I just thought of the following perverse variation:


     @IPN = split m"\.", $1;

It uses '"' as delimiters, but thanks to the "m" prefix, it still is a
pattern, and parsed as a pattern. Therefore, it needs just one
backslash.

-- 
	Bart.

# ===== Want to unsubscribe from this list?
# ===== Send mail with body "unsubscribe" to macperl-request@macperl.org