[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Perl regex



Packy Anderson wrote:
> Fraser Campbell [fraser@baxter.net] writes:
> > I need to put line breaks in a string every 75 (or less) characters.
> 
> Why not just use the Text::Wrap module?  It already does what you want to
> do, and it's been debugged to death.  :)

Ha. I can crash Text::Wrap in at least three different ways. Anyway, I think
this will suffice for the original poster:

	$string =~ s/^\Q$substring\E/$replacement/;

-- 
see shy jo


Reply to: