perl script

view full story

http://www.linuxquestions.org – Hi all, I wrote a script to extract the body of an incoming mail but it is not working as expected. Script: #!/usr/bin/perl use Mail::Internet; my $mail = Mail::Internet->new( \*STDIN ); my $headers = $mail->head->header_hashref; my $sender = $mail->get('From'); my @sender = @{${$headers}{'From'}}; my $from = $headers->{From}->[0]; my $body = [ @{$mail->body} ]; print $body . "\n"; This is outputing: ARRAY(0x8cf407c) Instead of the real text messages in the body. Some one to help? Thanks! (HowTos)