in reply to How do unpack templates work
Try:
my( $bit1, $bit2 ) = unpack 'a4 a*', $uuid;
But, regarding your "more efficient than substr" remarks. For the sake of a single operation like this, you won't notice the difference; even if there actually is any.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How do unpack templates work
by unlinker (Monk) on Jul 20, 2012 at 19:06 UTC | |
by BrowserUk (Patriarch) on Jul 20, 2012 at 19:44 UTC | |
by unlinker (Monk) on Jul 20, 2012 at 20:12 UTC | |
by BrowserUk (Patriarch) on Jul 20, 2012 at 20:35 UTC | |
by unlinker (Monk) on Jul 20, 2012 at 21:12 UTC |