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

Re: [Sheflug] Quick PERL job



And Lo! The Great Prophet "Morris, David \(Allvac, UK\)" uttered these words of wisdom:
> 
> > 	$x =~ s/[^[:print:]]//g;
> 
> $x =~ s/\x00//;
> 
> ...seems a little shorter. I can't however comment on the benefits of
> one versus t'other, although your version is a bit more general, n'est
> pas?

Yep ... your's only removes nulls, but mine, using will remove all 
unprinatable characters. In the end depends what data you're seeing :-)

Chris...

ps, is it me or does the list seem to be very stop-start of late? 


-- 
\ Chris Johnson                 \ NP: J.S.Bach - 04. Fantasia and Fugue in 
 \ cej [at] nightwolf.org.uk          \ G minor, BWV 542 
  \ http://cej.nightwolf.org.uk/  \ 
   \ http://redclaw.org.uk/        ~---------------------------------------


___________________________________________________________________

Sheffield Linux User's Group -
http://www.sheflug.co.uk/mailfaq.html

  GNU the choice of a complete generation.