J
jason
running under HPUX.
Perl Newbie here.
I have a file with one record that can be very wide, possibly 5000+
bytes wide.
I need to replace every 80th byte in that record with a double quote.
I have the below script, with a failed attempt to replace x number of
spaces with the quote, but that solution will not work upon further
inspection of the data.
#!/usr/bin/perl
strict;
use warnings;
open RIN,"<x1" or die "ERROR!";
open ROUT,">x2" or die "ERROR!";
while (<RIN>) {
$_=~s/ / "/g;
print ROUT ($_);
}
print ROUT ("\"");
close (RIN);
close (ROUT);
Many thanks for any help or information.
Perl Newbie here.
I have a file with one record that can be very wide, possibly 5000+
bytes wide.
I need to replace every 80th byte in that record with a double quote.
I have the below script, with a failed attempt to replace x number of
spaces with the quote, but that solution will not work upon further
inspection of the data.
#!/usr/bin/perl
strict;
use warnings;
open RIN,"<x1" or die "ERROR!";
open ROUT,">x2" or die "ERROR!";
while (<RIN>) {
$_=~s/ / "/g;
print ROUT ($_);
}
print ROUT ("\"");
close (RIN);
close (ROUT);
Many thanks for any help or information.