$name =~ s/\s+$//;
which should do the trick.
For your display problem:
In general you can use pack/unpack for conversions.
Here I would just use:
use Data::Dumper; $Data::Dumper::Useqq = 1; print Dumper $name;
which would print $VAR1 = "12345\t\n"; in your example.
In reply to Re: Converting decimal value to hex
by mscharrer
in thread Converting decimal value to hex
by coldmiser
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |