# at the top of the script
use Data::Dumper;
... # later
print Dumper $input;
# or, sometimes more effective to ensure
# that each var doesn't have newlines or other
# nonsense
for (qw(to from body)){
print "\n\n>$input->{$_}<\n\n";
}
unless (($input->{to}) && ($input->{from}) && ($input->{body}) && ($in
+put->{id})) {
####
>steveb@cpan.org<
####
open my $wfh, '>', '/home/user/debug.txt' or die $!;
for (qw(to from body)){
print $wfh "\n\n>$input->{$_}<\n\n";
}