On Jul 2, Sudarsan Raghavan said:

>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?
>
>You are not doing anything wrong, the extra space at the start is due to
>$" (perldoc perlvar). You have two options Change the print statement
>like this
[...]
>or loop through @array and write the elements individually into OUTFILe

And what's wrong with just doing:

  print OUTFILE @array;

That's fine -- printing a list of strings (each with their own newline).

-- 
Jeff "japhy" Pinyan      [EMAIL PROTECTED]      http://www.pobox.com/~japhy/
RPI Acacia brother #734   http://www.perlmonks.org/   http://www.cpan.org/
** Look for "Regular Expressions in Perl" published by Manning, in 2002 **
<stu> what does y/// stand for?  <tenderpuss> why, yansliterate of course.
[  I'm looking for programming work.  If you like my work, let me know.  ]


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to