Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Splitting every 3 digits?

by Sigmund (Pilgrim)
on Oct 02, 2001 at 13:22 UTC ( [id://116086]=note: print w/replies, xml ) Need Help??


in reply to Splitting every 3 digits?

Hi,
Why don't you just unpack???

#!/usr/bin/perl $a = '059057034037063107105003046039039036107063035046'; $lag = "a3" x ((length $a)/3); @nums = unpack $lag, $a; foreach(@nums) { print; print "\n"; }


SiG

perl -le 's ssSss.s sSsSiss.s s$sSss.s s.$s\107ss.print'

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (2)
As of 2024-04-24 16:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found