in reply to Re: Dealing with files with differing line endings
in thread Dealing with files with differing line endings
use strict; use warnings; package NewChomp; use Data::Dump qw/pp dd/; use subs qw/chomp/; sub chomp { $_[0] =~ s/\n$//; # adjust here } pp my $line ="abcd\n"; chomp $line; pp $line;
Just export it from a new module into your scripts, and adjust the regex to your needs.
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
|
|---|