LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   runing perl unix script in windows 2000 (https://www.linuxquestions.org/questions/programming-9/runing-perl-unix-script-in-windows-2000-a-313526/)

anirudh 04-15-2005 08:46 AM

runing perl unix script in windows 2000
 
here is a script which runs in unix
i want this script to run in windows what changes i need to do to this to make it work
also where can i get a perl interpretor for windows 2000 to be installed

#!/usr/local/bin/perl
# Description: 5-min load average.
# Sample User Defined Event monitoring script.
$ENV{PATH} = "/bin:/usr/bin:/usr/sbin";
$DATA = `uptime`;
$DATA =~ /average:\s+([\.\d]+),\s+([\.\d]+),\s+([\.\d]+)\s*$/;
if (defined $2) {
print "em_result=$2\n";
} else {
die "Error collecting data\n";
}

i understand i need to change the #! to my perl lib in windows

what about the $ENV{PATH} what changes i need to make

0.o 04-15-2005 08:55 AM

heh.
1. Delete that script.

2. Rewrite the whole thing.

http://www.cpan.org/

anirudh 04-15-2005 09:06 AM

as i am not aware of perl and i need to do this really soon can some one help me with a bat file that does the same thing this perl is doing

anirudh 04-15-2005 10:07 AM

one thing this script does is that it monitors the 5-minute load average on the
system using the unix command uptime
its equvivalent command in windows in net
can some one help with this


All times are GMT -5. The time now is 06:26 AM.