Or, alternately, get rid of the use Data::Dumper, and change the Dumper line to:use Net::SMTP; use Data::Dumper; $mdarray = [ [0,1,2], [3,4,5] ]; my $mail = Net::SMTP->new("smtp.server"); $mail->from('Some@from.addr'); $mail->to('your@addr.here'); $mail->data(); $mail->datasend("From: Some\@From.addr\n"); $mail->datasend("To: your\@to.addr\n"); $mail->datasend("Subject: Data from web site\n"); $mail->datasend("Date: " . scalar(localtime()) . "\n\n"); $mail->datasend(Dumper($mdarray)); $mail->dataend(); $mail->quit;
Or even yet:foreach my $row (@{$mdarray}) { $mail->datasend("data row: @{$row}"); }
Any of those approaches should work.foreach my $row (@{$mdarray}) { $mail->datasend("item 1: $row->[0]\n"); ... }
update: whoops! the remainder of the datasend got put into the from: field. Fixed correctly.
In reply to Re: Perl and CGI
by sachmet
in thread Perl and CGI
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |