develooper Front page | perl.par | Postings from February 2005

Re: -d switch erroring out on Windows XP

Thread Previous | Thread Next
From:
Robert
Date:
February 7, 2005 07:30
Subject:
Re: -d switch erroring out on Windows XP
Message ID:
20050207152714.19316.qmail@lists.develooper.com
Here is the script:

use strict;
use warnings;
use Mail::Sender;

# run the program
my @run1 = ( "M:\\Program Files\\Mincom\\MIMS Open 
Enterprise\\5.2.3.2\\bin\\msqupd.exe ", "ellprd" );
my @run2 = ( "M:\\Program Files\\Mincom\\MIMS Open 
Enterprise\\5.2.3.2\\bin\\msqupd.exe ", "elltst" );

print "==================================\n";
print " Running popup updates for ELLPRD \n";
print "==================================\n\n";
system(@run1);

print "==================================\n";
print " Running popup updates for ELLTST \n";
print "==================================\n";
system(@run2);

my $file = "M:\\Program Files\\Mincom\\ParadoxMaster\\msqupd.log";
my $uname = $ENV{'COMPUTERNAME'};
my $text;

{
    open FILE, $file || die "Ooops $!";
    local $/;    # slurp mode, local only
    $text = <FILE>;
    close FILE;
}

my $sender = new Mail::Sender {
    smtp => 'mailout.uscg.mil',
    from => 'bhicks@osc.uscg.mil',
};

$sender->MailMsg(
    {
        to      => 'bhicks@osc.uscg.mil',
        subject => "$uname: Nightly Popups Report",
        msg     => $text,
    }
);

my $timestamp = time;
rename( $file, "$file." . $timestamp ) || die "Couldn't rename: $!";



Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About