Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Extracting Attachments Using MIME::Parse

by samarzone (Pilgrim)
on Dec 10, 2010 at 08:22 UTC ( #876398=note: print w/ replies, xml ) Need Help??


in reply to Extracting Attachments Using MIME::Parse

If $path is the physical path of the file you can use open and related functions to read the file.

Also note that you have strictly told compiler not to accept any arguments in subroutine handle_other by giving blank parens. Your call handle_other($entity->bodyhandle->path) will fail. To accept variable number of arguments you should remove the parens.


Comment on Re: Extracting Attachments Using MIME::Parse
Select or Download Code
Re^2: Extracting Attachments Using MIME::Parse
by pgadekar (Initiate) on Dec 10, 2010 at 10:39 UTC

    Thank you very much.

    I have changed the sub handle_other to
    sub handle_other { my $handle = shift; my $body = $handle->as_string; }
      Will it be good approach that I have used in above code ?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://876398]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (14)
As of 2014-09-22 15:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (198 votes), past polls