on Tue, 02 Jul 2002 08:33:51 GMT, Mark-Nathaniel Weisman wrote:
> I've got a script that reads a mail file, then copies it into an array.
> The same script then pulls the data out of the array into another file
> location. I've got a situation here, in that when I do the print
> OUTFILE "@array"; it adds a singular space in front of each line after
> the first, so the first line reads OK, but then the rest of the file is
> off by one character, what am I doing wrong?
When you enclose an array in double quotes in a print statement, you get a
space character printed between the elements. Since you have a newline at
the end of each line, you get this space character in front of each line,
starting with the second. If you
print OUTFILE @array;
it should work as intended (without the spaces).
But why are you reading your complete file into memory? The following
lines should do the same on a line-by-line basis (after your open-
statements):
print OUTFILE while <INFILE>;
--
felix
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]