in reply to how should i test whether a string contains between 6 and 20 letters and numbers
use strict; use warnings; my $str = $ARGV[0]; if ($str =~ /^[a-zA-Z0-9]{6,20}$/) { print "success!\n"; } else { print "failure\n"; } [download]
A bit shorter.
Scott