D
derek / nul
I have a problem with the join command inserting and extra \n on the end of
every line.
I don't seen to be able to get rid of them.
@linesengwag1 is a list of lines of a parameters for M$ Train Sim
I am 'join'ing the list so that I can encode it back to unicode.
I am trying to use s/// to get rid of the extra \n's but the program gives no
warnings but stops after the first line (ie where the first \n is).
Am I doing anything wrong?
==================================================
# win32 Activestate 5.8.0
use strict;
use warnings;
$linesengwagu = join("\n",@linesengwag1);
$linesengwagun = encode("UTF16LE", $linesengwagu);
#
$linesengwagun =~ s/"\x0D","\x00","\x0A","\x00"/"\x0D","\x00"/
#
open ENGWAG, ">$currentlongengfile", or die "Cannot open
binmode ENGWAG;
print ENGWAG "\xFF","\xFE",$linesengwagun;
close ENGWAG;
every line.
I don't seen to be able to get rid of them.
@linesengwag1 is a list of lines of a parameters for M$ Train Sim
I am 'join'ing the list so that I can encode it back to unicode.
I am trying to use s/// to get rid of the extra \n's but the program gives no
warnings but stops after the first line (ie where the first \n is).
Am I doing anything wrong?
==================================================
# win32 Activestate 5.8.0
use strict;
use warnings;
$linesengwagu = join("\n",@linesengwag1);
$linesengwagun = encode("UTF16LE", $linesengwagu);
#
$linesengwagun =~ s/"\x0D","\x00","\x0A","\x00"/"\x0D","\x00"/
#
open ENGWAG, ">$currentlongengfile", or die "Cannot open
binmode ENGWAG;
print ENGWAG "\xFF","\xFE",$linesengwagun;
close ENGWAG;