$input =”12345”; $value1 = chop($input); $value2=chomp($input”); print $value1, $value2;
1234 and 1
12345 and 0
1234 and 0
5 and 0
1 and 0