or download this
# create a MIME::Parser object to
# extract any attachments found within.
my $parser = new MIME::Parser;
...
# determine the path to the file in question.
my $path = ($part->bodyhandle) ? $part->bodyhandle->path : undef
+;
print "This is the $path \n"; #right here if it doesnt have the
+ brackets it will give the correct file name if it does it will come
+back -1.pdf or some other count