in reply to passing data using MIME::Lite
how about this:
It's still messy, though.sub sql { $sqlCount->execute or die "Can't execute query"; my $data; while (@output=$sqlCount->fetchrow_array) { $data .= "data: @output \n"; } $sqlCount->finish(); $dbcon->disconnect(); return $data; } # .... my $msg = MIME::Lite->new( From=>'', To =>'', Subject=>'', Data => sql() );
Also see perlsub
|
|---|