We don't bite newbies here... much | |
PerlMonks |
Re^3: Email::Mime 1 email + multiple attachmentsby Eliya (Vicar) |
on May 20, 2012 at 18:22 UTC ( [id://971509]=note: print w/replies, xml ) | Need Help?? |
If I'm trying to access @parts not in "foreach" @parts are empty. You don't show the updated code, but my guess would be that you still have my @parts = ... within the foreach loop (like in your OP), instead of declaring the @parts array outside of the loop (like in the code I outlined). If you declare it within the loop, it's lexically scoped to the loop, i.e. not accessible outside of it. Also, you'd create a new array instance on every iteration, instead of accumulating stuff in it.
In Section
Seekers of Perl Wisdom
|
|