Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Breaking down whole number into digits

by ww (Archbishop)
on Nov 29, 2012 at 21:25 UTC ( #1006359=note: print w/replies, xml ) Need Help??


in reply to Breaking down whole number into digits

Ignoring (because you've given us no hint of how you plan to translate "Nov" to 11), you can, of course, use a regex to separate a number like "11" into separate digits:

>perl -E "my $foo=11; if ($foo =~ /(\d{1})(\d{1})/) { say \"$1 \t $2\" +;}" 1 1

Note that this is NOT a recommended approach since it doesn't deal with "1995" or with the ...say, second day of a month.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1006359]
help
Chatterbox?
[1nickt]: Corion Surely you have one or more lying around?
[Corion]: 1nickt: Not in the general sense... I only have very specific crawlers, but not a simple crawler like that ;) But maybe that would be a good application/( stress) test for Future::HTTP to parallelize

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2017-10-18 11:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My fridge is mostly full of:

















    Results (244 votes). Check out past polls.

    Notices?