You may try something like this (tested) example
#!/usr/bin/perl use strict; use warnings; use IO::File; use Mail::Internet; defined $ARGV[0] or die 'Usage: perl emailprogramma3.txt perltst\n'; my $file = $ARGV[0]; my $fh = new IO::File; # See File::Spec catpath method my $path = '/where/is/perltst/' . $file; $fh->open("< $file") or die "Can't open $file\n"; my $mail = Mail::Internet->new($fh); $mail->print_body; $fh->close; __END__ Output : ------ Content-Type: text/plain; name="Niet zelf een nummer bedenken!.txt" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="Niet zelf een nummer bedenken!.txt" SW4gZfafajkGAGEQRda789UIOKAJkljfqj8q8gdG9ldm9lZ2VuGAOGJHAFfagkl4538daj +a a3QgaGllcnZvb3IgQWRkSXRlbSBvZiBkZgBzdGFuZGFhcmQgcHJvZ3JhbW1hJ3MgdmFuIE +lC Qiag6FGIJ891rgahuClJCQQ== --------------000002060003020904090008--
hth,
PooLpi
In reply to Re: loading files
by poolpi
in thread loading files
by Bass-Fighter
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |