- or download this
if ($test1 = $test2) {
$comp = "EQUALS";
} else {
$comp = "Does NOT Equal";
}
- or download this
my $test1 = 123;
my $test2 = 456;
...
$comp = "Does NOT Equal";
}
print "3. Test1: '$test1', test2: '$test2'\n";
- or download this
=head2 C<decode_COMP3>
...
else { $digits .= $sign; $sign = '?' };
"$sign$digits"
};
- or download this
sub decode_BCD {
unpack "H*", $_[0];
};
- or download this
use strict;
use Test::More tests => 4;
...
is decode_BCD("\x12\x34\x56","123456");
is decode_BCD("\x00\x34\x56","003456");
is decode_BCD("\x12","12");