Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
filter denies existence of inputby hesco (Deacon) |
on Aug 22, 2009 at 15:31 UTC ( [id://790580]=perlquestion: print w/replies, xml ) | Need Help?? |
hesco has asked for the wisdom of the Perl Monks concerning the following question:
I am seeing an error reading: Use of uninitialized value $email in print at /home/hesco/lib/perl/ETC/parse_email.pl line 13., when I invoke a pipe, like this:
That code begins like so:
and if I pipe that cat output to less instead of through my filter, I get what appears to be an email. How is it that value would be uninitialized? So next I copied my .mbox file to itself, giving it a new extension of .sample, and edit the .sample so that it contains ONLY a single email, dropped the formail invocation from my pipe and try this:
yielding the same result:
And now I am really confused. -- Hugh UPDATE: mortiz, zwon: So you are right. This seems to work much better:
Now to figure out why my formail -s is only giving me the first email in the mbox file. Thanks folks! Never mind on that. formail -s expects the filter as an argument to the -s switch, not to pipe STDOUT to the filter. Issue resolved with:
if( $lal && $lol ) { $life++; }
Back to
Seekers of Perl Wisdom
|
|