Grygonos has asked for the wisdom of the Perl Monks concerning the following question:
I also tried syswrite rather than print, but it yielded the same results.#!/Perl/bin/perl use strict; use warnings; my $line; open (ORIGINAL,"<1.txt") or die "$!"; open (NEWFILE,">new_1.txt") or die "$!"; while(!eof ORIGINAL) { sysread ORIGINAL,$line,5201,0; chop $line; print NEWFILE $line; } close(NEWFILE); close(ORIGINAL);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: EBCDIC File I/O
by MonkE (Hermit) on May 17, 2006 at 13:30 UTC | |
by Grygonos (Chaplain) on May 17, 2006 at 13:38 UTC | |
|
Re: EBCDIC File I/O
by bass_warrior (Beadle) on May 17, 2006 at 18:47 UTC | |
by djp (Hermit) on May 18, 2006 at 03:42 UTC | |
by rodion (Chaplain) on May 18, 2006 at 03:46 UTC |