WC -Sx- Jones wrote:
What I was shooting for -
/213\.37\.(?:150...251)\.(?:0...255)/
Hell, for that matter - what is the proper syntax for:

#! /usr/local/bin/perl -w

use strict;
use warnings;

my ($first, $second, $third, $fourth, $x, $ip) = (213, 37, 150, 0);

$ip = "$first.$second.$third.$fourth";
print "Trying: $ip\n";

print "v1 Matched: $ip\n" if $ip =~
/213\.37\.(??{foreach (150..251){ $x .="$_|"; } chop $x;})\.\d{1,3}/;

__END__


Should I use a return() there? Nope - Can't return outside a subroutine at (re_eval 1) line 1.

How does ??{} know what code to pick up?

The code should "make availabke"(?) -

150|151|152 et al...

--
_Sx_ http://youve-reached-the.endoftheinternet.org/ _____
     http://jaxpm.insecurity.org/
     http://cis4dl.insecurity.org/

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to