my ($scrip) = $ARGV[0] =~ /\d+\.\d+\.\d+\.\d+/; if($scrip) { print "matched $ARGV[0] !\n"; }else{ print "did not match $ARGV[0] !\n"; } print "\$scrip = $scrip\n";