Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: trivial wrapping

by mce (Curate)
on Nov 18, 2002 at 15:06 UTC ( [id://213762]=note: print w/replies, xml ) Need Help??


in reply to trivial wrapping

Hi,
This is also non destructive, and uses a regexp:
( $_ = $genome1 ) =~ s/(.{60})/print $1."\n"/eg;
Note the print statement in the regex using the e flag.

I don't know which is the most performant, but I do think that substr is more performant than a plain regex.
But regexes are more fun :-)
---------------------------
Dr. Mark Ceulemans
Senior Consultant
IT Masters, Belgium

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2024-04-18 18:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found