Don't ask to ask, just ask | |
PerlMonks |
Re: Extracting full digits from a rangeby davido (Cardinal) |
on Aug 03, 2012 at 23:28 UTC ( [id://985366]=note: print w/replies, xml ) | Need Help?? |
The following code takes these steps:
The output:
Let's put it in a (debatably) well-named subroutine so we remember what this gem does:
Just add some camel casing randomly through the subroutine name and it would feel right at home in a PHP application. The hardest part of coming up with something like this is keeping track of which of the many pack/unpack template tokens to use from [Hh] and [SsNnVv]. I have to admit to needing to experiment with a couple of one-liners to make sure my conversions were going the right direction. Dave
In Section
Seekers of Perl Wisdom
|
|