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

(dkubb) Re: (1) One liner: split fixed-width field into equal length chunks...

by dkubb (Deacon)
on Mar 21, 2003 at 22:51 UTC ( #245024=note: print w/replies, xml ) Need Help??


in reply to One liner: split fixed-width field into equal length chunks...

If you're using perl 5.8 you can use the new sub-template function in unpack:

my @d = unpack "(A$n)*", $string;

Dan Kubb, Perl Programmer

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (4)
As of 2022-12-09 01:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?