$Bill wrote:
>Suresh Govindachar wrote:
>>
>> The following code is meant for a Big-endian processor running
>> linux. The code reads binary files and assigns values to
>> structures. I would like to read the same data files in perl on
>> Windows on little endian x86. Any tips on d
Suresh Govindachar wrote:
> $Bill wrote:
> >Suresh Govindachar wrote:
> >>
> >> The following code is meant for a Big-endian processor running
> >> linux. The code reads binary files and assigns values to
> >> structures. I would like to read the same data files in perl on
> >> Windo
Hello,
The following dos2unix one-liners
perl -i~ -pe "s/\r\n$/\n/"
fails in windows. I think it is because when
perl writes the resulting file, it re-inserts \r\n!
The following code almost works:
$^I = '~';
my $file_name = $ARGV[0];
my @lines = ();