in reply to Simple length question
#!/usr/bin/perl -w use strict; my $errmsg = "Too Few Characters in Company Login Name"; sub err{ print $errmsg; } my $compname = "Sears"; &err if (length($compname) < 6); # prints $errmsg $compname = "Sears Roebuck"; &err if (length($compname) < 6); # doesn't.
|
|---|