Teresa,
Make sure you look into the confusing syntax of writing an e-mail
attachment. Here's a good place to look:
http://alma.ch/perl/Mail-Sendmail-FAQ.htm#attachments
It contains a neat module (I have not tried it ... it contained way
more than I needed when I found this page). Sorry about not helping
much w/ the code ... I'm learning from reading all the posts, and
soaking up as much as possible before shooting off my mouth.
Only thoughts (never used CGI.pm, so I could be wrong) ... where do
you declare the hash "in" ... I don't see it anywhere. Also, it might
help in the readbility if you were to place a space between keys and
%in.
Do you need to have a colon before all in line 3 when you call CGI.pm?
Stephen
______________________________ Reply Separator _________________________________
Subject: email attachment
Author: <[EMAIL PROTECTED]> at Internet
Date: 06/17/2001 9:46 PM
Okay, I am just starting to use CGI.pm to write an prog that sends an
email with an attachment.
I am receiving the error: # Global symbol "in" requires explicit package name.
File 'Hard Disk:Desktop Folder:DOCS:CWN:ADS UPLOAD:ademail.cgi'; Line 14
I don't understand how I am supposed to correct this error, I tried
declaring with main::in, my $in but am only continuing to get the
error msg.
This prog is just a proto writing of the actual script to test what
CGI.pm does. If you have any corrections or thoughts, I'm glad to
hear it.
#!/usr/local/bin/perl -w
use strict;
use CGI qw(:all);
$CGI::POST_MAX = 1_048_576; # 1 MEG FILE SIZE LIMIT
ReadParse();
print header;
my $cgi = CGI->new;
my $file = $cgi->upload( "ad" ) or error( $cgi->p( "No file uploaded." ) );
my $format = $cgi->uploadInfo( $file )->{ 'Content-Type' };
foreach my $i (keys%in)
{ print "$i\n";
}
#END PROGRAM
*** Teresa Raymond
*** http://www.mariposanet.com
*** [EMAIL PROTECTED]