it's an identification number of the shape 9525423E. @digits is gotten using a split:I think in this case you're better of using a regex, so you can verify the input split more conveniently:
my $input = '9525429E'; if ( $input =~ /^([0-9]{7})([A-Z])$/ ) { my @digits = split //, $1; print "@digits, $2"; } else { print "invalid input"; }
In reply to Re^2: A better way than ||
by holli
in thread A better way than ||
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |