jettero has asked for the wisdom of the Perl Monks concerning the following question:
my $number = undef; if( $string =~ m/(.)(.)/ ) { $number = hex( unpack("H*", "$2$1") ); }
Now, there has got to be a better way to do that. Please help?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: hex(unpack("H*")) help?!?!
by Thelonius (Priest) on Oct 31, 2002 at 17:14 UTC | |
by jettero (Monsignor) on Oct 31, 2002 at 17:17 UTC | |
|
Re: hex(unpack("H*")) help?!?!
by davorg (Chancellor) on Oct 31, 2002 at 17:07 UTC | |
by jettero (Monsignor) on Oct 31, 2002 at 17:09 UTC | |
by davorg (Chancellor) on Oct 31, 2002 at 17:14 UTC | |
by jettero (Monsignor) on Oct 31, 2002 at 17:19 UTC | |
by davorg (Chancellor) on Oct 31, 2002 at 17:24 UTC | |
| |
by jettero (Monsignor) on Oct 31, 2002 at 17:14 UTC |