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? Thanx! -Michael cat grab.pl #!/usr/bin/perl -w # This grabs a copy of the message coming in and prints it to # STDOUT as well as a file. @msg = <STDIN>; print "@msg"; open(message_file, ">> messages.txt"); print message_file "@msg"; close(message_file); cat grab.pl | ./grab.pl #!/usr/bin/perl -w # This grabs a copy of the message coming in and prints it to # STDOUT as well as a file. { The rest of the script is echoed with spaces in front of each line, just like the two above.} -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]