coldmiser has asked for the wisdom of the Perl Monks concerning the following question:
but it doesn't remove whatever is after the part I can see.chomp $name; $name =~ s/^(.*)(\b|\W)/$1/;
For example, the value in my scalar is '12345 \t \n ' Now of course I cannot see the tab and new line characters so I am not positive what is after the '12345' I am looking for a way to turn this value into a HEX string so I can see it says something like '30 31 32 33 34 35 20 20 20 20 09 20 20 0D 20 20 20'.
Is there an easy way to do this so I can remove the extra stuff at the end?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Converting decimal value to hex
by mscharrer (Hermit) on May 16, 2008 at 17:15 UTC | |
|
Re: Converting decimal value to hex
by roboticus (Chancellor) on May 16, 2008 at 17:09 UTC | |
|
Re: Converting decimal value to hex
by ikegami (Patriarch) on May 16, 2008 at 19:19 UTC | |
|
Re: Converting decimal value to hex
by ikegami (Patriarch) on May 16, 2008 at 19:30 UTC | |
|
Re: Converting decimal value to hex
by coldmiser (Hermit) on May 16, 2008 at 17:26 UTC | |
by psini (Deacon) on May 16, 2008 at 17:50 UTC | |
by grizzley (Chaplain) on May 19, 2008 at 09:35 UTC | |
|
Re: Converting decimal value to hex
by coldmiser (Hermit) on May 16, 2008 at 19:27 UTC |