Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: MIME Errors

by arhuman (Vicar)
on Nov 23, 2001 at 15:23 UTC ( #127090=note: print w/ replies, xml ) Need Help??


in reply to MIME Errors

Probably the missing semi-colon after the eval block...
I also suspect the last '}' to be unmatched (and useless) ?

PS : Being consistent in your code layout would help finding such 'bracket error'.
See perlstyle for good advices...
As always : just my humble opinion..

UPDATE : To find where to place the semi-colon see eval
the syntax is explained and several examples given.
And sorry but I couldn't resist : RTFM !! ;-)


"Only Bad Coders Code Badly In Perl" (OBC2BIP)


Comment on Re: MIME Errors
Re: Re: MIME Errors
by Anonymous Monk on Nov 23, 2001 at 15:29 UTC
    ?I have fixed the unmatched '}' but the two errors remain :( How do you mean semi-colon after eval block? There is on at the end of that line, is there supposed to another ?
    use MIME::Parser; use Mail::Address; $parser = new MIME::Parser; eval { $MIME_entity = $parser->parse(\*STDIN); } if ($@){ print 'Trouble parsing mail:'; print $parser->results->msgs(); } else { $header = $MIME_entity->head(); $subject = $header->get('Subject'); my $from = $header->get('From'); my @from_addresses = Mail::Address->parse($from); my $address; if (@from_addresses) { $address = $from_addresses[0]->address(); } else { print "No address found in from line!\n"; } $bodyh = $ent->bodyhandle; } $parser->filer->purge();

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (9)
As of 2014-08-22 13:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (158 votes), past polls