Dear List,

I've been struggeling with the following:

#!/usr/bin/perl

use strict;
use warnings;

my $ip = ("127.0.0.255");

if ($ip =~ /127\.0\.0\.[2..254]/) {
  print "IP Matched!\n";;
} else {
  print "No Match!\n";
}

For a reason i don't understand:

127.0.0.1 doesn't match as expected...
Everything between 127.0.0.2 and 127.0.0.299 matches...
127.0.0.230 doesn't match... 

What am I doing wrong??

Thanks! 


- 
Marco van Kammen
Springer Science+Business Media
System Manager & Postmaster 
- 
van Godewijckstraat 30 | 3311 GX
Office Number: 05E21 
Dordrecht | The Netherlands 
-  
tel 
 +31(78)6576446
fax 
 +31(78)6576302

- 
www.springeronline.com 
www.springer.com
- 



--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to