> From: Rich West [mailto:[EMAIL PROTECTED] + my @mailing_lists = (); > sub get_lists > { + return @mailing_lists if @mailing_lists(); # if already cached in this slave, return + # otherwise look it up > open (LISTS, "/var/mailman/bin/list_lists -b|") > or die "Could not execute '/var/mailman/bin/list_lists -b'.\n"; > @lists = <LISTS>; > close(LISTS); + @mailing_lists = @lists; # cache > return (@lists); > }
It's possible to get fancier - you could have a global $lastgotlistsat to hold the date/time of the last pull, and re-pull if that was sufficiently long ago. [EMAIL PROTECTED] 805.964.4554 x902 Hispanic Business Inc./HireDiversity.com Software Engineer perl -e"map{y/a-z/l-za-k/;print}shift" "Jjhi pcdiwtg Ptga wprztg," _______________________________________________ Visit http://www.mimedefang.org and http://www.canit.ca MIMEDefang mailing list [EMAIL PROTECTED] http://lists.roaringpenguin.com/mailman/listinfo/mimedefang