develooper Front page | perl.perl5.porters | Postings from July 2008

Re: cross-platform line-endings (was: Removing files called minus)

From:
Ben Morrow
Date:
July 30, 2008 13:33
Subject:
Re: cross-platform line-endings (was: Removing files called minus)
Message ID:
v8v6m5-cth1.ln1@osiris.mauzo.dyndns.org

Quoth tchrist@perl.com (Tom Christiansen):
> 
> I'd rather like a line-discipline-sniffing module that did something
> like /usr/bin/file does via /etc/magic, and lets you then binmode
> and/or  $/-mangle appropriately.
> 
> Hey, if *that's* not a magic open (ie, using /etc/magic), I sure
> dunno what is! :-)
> 
> I don't suppose anyone might know whether one exists already?

I wrote one as a proof-of-concept, and Audrey Tang turned it into
PerlIO::eol, which actually works :).

Ben

-- 
'Deserve [death]? I daresay he did. Many live that deserve death. And some die
that deserve life. Can you give it to them? Then do not be too eager to deal
out death in judgement. For even the very wise cannot see all ends.'
                                                               ben@morrow.me.uk



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About