Michael Weber wrote:
> 
> I am trying to write a mail filter that grabs the output of SpamAssassin
> and drops any messages that score above a certain number of points.
> 
> As I am writing it, I want to see exactly what the perl script is
> getting and outputting.  It's a pretty simple script now, it does no
> filtering at all, yet.  It just grabs the message stream from STDIN,
> copies it to a file and prints it back to STDOUT.
> 
> But, with an extra space prepended to each line after the first one.
> The extra space is in both the saved file and the STDOUT stream.
> 
> I know it's got to be something simple, but what?

perldoc -q spaces

Found in /usr/lib/perl5/5.6.0/pod/perlfaq5.pod
       Why do I get weird spaces when I print an array of lines?

       Saying

           print "@lines\n";

       joins together the elements of [EMAIL PROTECTED]' with a space
       between them.  If [EMAIL PROTECTED]' were `("little", "fluffy",
       "clouds")' then the above statement would print:

           little fluffy clouds

       but if each element of [EMAIL PROTECTED]' was a line of text, ending
       a newline character `("little\n", "fluffy\n", "clouds\n")'
       then it would print:

           little
            fluffy
            clouds

       If your array contains lines, just print them:

           print @lines;


John
-- 
use Perl;
program
fulfillment

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

Reply via email to