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

Re^2: Chomping most of a _long_ text string

by ihb (Deacon)
on May 29, 2005 at 19:19 UTC ( [id://461567] : note . print w/replies, xml ) Need Help??


in reply to Re: Chomping most of a _long_ text string
in thread Chomping most of a _long_ text string

You'd better have a limit on that split as well, so that you don't chop up any e-mails that have 70 underscores in it:

(undef, $goodpart) = split /_{70}/, $msg, 2;
Note that since this supposedly is a huge string you create a huge copy while doing this, even if you assign it back to $msg, afaik.

ihb

See perltoc if you don't know which perldoc to read!