in reply to Perl equivalent of Java code
You can use unpack. But unless you're already a pack/unpack wizard, it will take you about 10 times longer to figure out the magical unpack formula than, for example, the following simple solution:
my $key = "0123456789ABCDEF0123456789ABCDEF"; my @b = map { chr hex $_ } $key =~ /(..)/g;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Perl equivalent of Java code
by ikegami (Patriarch) on Jan 19, 2006 at 17:01 UTC | |
by Anonymous Monk on Jan 19, 2006 at 17:31 UTC | |
by ikegami (Patriarch) on Jan 19, 2006 at 17:40 UTC | |
by ikegami (Patriarch) on Jan 19, 2006 at 17:48 UTC | |
by Anonymous Monk on Jan 20, 2006 at 03:46 UTC | |
by ikegami (Patriarch) on Jan 20, 2006 at 05:22 UTC |