foreach my $at ( @attachments ) { if ( $at->{content_type} =~ /pdf/i ) { open(my $fh, '>', $at->{filename} ) || die ( $!); binmode $fh; print $fh $at->{payload}; $fh->close(); } }
In reply to Re: Downloading Gmail attachments - Corrupted saved file
by localshop
in thread Downloading Gmail attachments - Corrupted saved file
by casimo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |