Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Breaking up a string?

by lidden (Curate)
on Feb 19, 2008 at 15:53 UTC ( #668820=note: print w/replies, xml ) Need Help??


in reply to Breaking up a string?

While you most likely want what BrowserUk said above, here is one that use the fact that your input is numerical.
use bigint; my $num = 111111555555123456; my @array; while( $num ){ unshift @array, $num % 1_000_000; $num /= 1_000_000; } print "@array\n";
Though it will be eating leading zeros.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://668820]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2023-12-11 21:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?











    Results (41 votes). Check out past polls.

    Notices?