Skip to content

Instantly share code, notes, and snippets.

@tryperl
Created April 15, 2014 18:45
Show Gist options
  • Save tryperl/10758182 to your computer and use it in GitHub Desktop.
Save tryperl/10758182 to your computer and use it in GitHub Desktop.
Created by www.tryperl.com.
#Created by tryperl.com
use strict;
use warnings;
$custip="206.223.143.252/24;";
$custwanip="127.1.256.1";
print "$custip\n";
$IP_CHECK_FAIL_MSG="";
if($custip!~m/(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\/(1[8-9]|2[0-9]))$/){
print "Im here\n";
$IP_CHECK_FAIL_MSG=$IP_CHECK_FAIL_MSG."$custip\n";
}
print $IP_CHECK_FAIL_MSG;
# print <>; #you can use the STDIN to put data into your program
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment