Hi,
have a look at perlvar; search for $INPUT_RECORD_SEPARATOR
You can set that variable to the needed character/string to parse your files...
Example snippet:
#! /usr/bin/perl use strict; use warnings; # ... for my $file ( @files ) { if ( open my $fh, '<', $file ) { # see perldoc perlvar local $/ = "\x0d"; @lines = <$fh>; } else { warn "$file: $!\n"; } }
In reply to Re: Opening text files with CR format
by linuxer
in thread Opening text files with CR format
by knith
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |