# unavailable items init use strict; # Loop through locations; for each location, run other perl scripts, passing a parameter to them # that contains a part of the filename that will be created, bib loc, itype, mat type(s) (separated by hyphens). # % means all # They hyphens will be changed to pipes in the other script; when I put the pipes in this script # it wouldn't work. my $location; my @locations = ( "music-cds,av,42,%", "audiobooks,av,43,%", "dvds-and-blu-rays,av,31-32,%", "large-print,%,%,x", "fiction,afic,%,%", "nonfiction,anon,%,%", "teen,ya,%,%", "children's,j,%,%", ); foreach $location(@locations) { system("c:\\scripts\\unavailable-items.pl $location"); }; use strict; use warnings; use MIME::Lite; # Configure smtp server - required one time only MIME::Lite->send ("smtp", "999.999.999.999"); # ip address of mail server that can relay things from this machine my $message = "This month's reports of unavailable items are now available as Excel files at the URLs below. These are items that either (1) are withdrawn, or (2) have status missing, claims returned, billed, or billed & paid and were last updated over 3 months ago. http://somewhere.something/unavailable-items-fiction.xlsx etc. "; my $msg = MIME::Lite->new ( From => 'somebody@somewhere.something', To => 'somebody@somewhere.something', Cc => 'somebody@somewhere.something', Data => $message, Subject => "Unavailable Items Reports", ); $msg->send ();