my ($scrip) = $ARGV[0] =~ /^(\d+\.\d+\.\d+\.\d+)/; print "\$scrip returned : $scrip\n"; print "match 1 : $1\nmatch 2 : $2\nmatch 3 : $3\nmatch 4 : $4\n"; #### 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";