in reply to specific numbers of digits
$zip =~ m/\d{5,5}/; [download]
Sorry to point this out, but..
$x = "123456"; if ( $x =~ /\d{5,5}/ ) { print "wrong"; } [download]
Still matches 123456
This will do the trick
$x = "123456"; if ( $x =~ /^\d{5}$/ ) { print "right"; } [download]