Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Mirror/Copy Mozilla thunderbird emails to IMAP server

by davidrw (Prior)
on Mar 08, 2006 at 16:08 UTC ( #535200=note: print w/replies, xml ) Need Help??


in reply to Mirror/Copy Mozilla thunderbird emails to IMAP server

An alternative to the recursion and readdir's and grep's is File::Find::Rule (and you could probably do it in one statement, too, but i left it in the same general form as OP):
use File::Find::Rule; my @dirs = ( $base_dir, File::Find::Rule->file()->directory()->name('* +.sbd')->in( $base_dir ) ); foreach my $dir ( @dirs ){ # do your $temp_dir munging here ... my @files = File::Find::Rule->file()->maxdepth(1)->not( File::Find:: +Rule->name('.*', '*.html', '*.sbd', '*.msf', '*.dat') )->in( $dir ); foreach my $mail_file ( @files ){ # do your $mail_file stuff here ... } }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://535200]
help
Chatterbox?
[Discipulus]: erix resize your elephant
[erix]: but elephant /are/ big
[Discipulus]: Lady_Aleena micro management of code, micro optimization is a pain, you'll brake working things
[Discipulus]: erix you are right but buy a bigger monitor for me then

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (7)
As of 2017-05-27 20:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?