On Jul 2, Mark-Nathaniel Weisman said: >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?
The Perl 5.6 FAQ includes this question. If you're running Perl 5.6, do perldoc -q space and read the second entry. >print OUTFILE "@array"; In short, remove the quotes. Printing an array in quotes is like doing print join($", @array); and the $" variable defaults to " ". -- 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]