RE: [Perl-unix-users] Script Help Please

2001-11-26 Thread Steve Aaron
Title: RE: [Perl-unix-users] Script Help Please Craig,     this seems to work okay. I made a few amendments but only to add warnings and use strict. Its easier to debug typos, bad initializations etc. with warning and strict set. Give this ago #!/usr/bin/perl

RE: [Perl-unix-users] Script Help Please

2001-11-26 Thread Craig Sharp
Steve, I made the correction as follows: if (/\bUP\b/ && /$server_name/) Does not work. I also tried: if (/$server_name/) Does not work. And: if (/\b$server_name\b/) Does not work. I have checked that the variable $server_name is defined but it seems like the co

RE: [Perl-unix-users] Script Help Please

2001-11-26 Thread Steve Aaron
Title: RE: [Perl-unix-users] Script Help Please Try if (/\bUP\b/ && /$server_name/) You are not matching on $server_name as $server_name is not enclosed by the match operator. You could easily put this in a single regular expression if the position of $server_name is predi

[Perl-unix-users] Script Help Please

2001-11-26 Thread Craig Sharp
Hi all, I am lost. I have the following script that opens the log file WUGEvent.log and looks for the statment "UP", replaces spaces and writes out the new log file. It works great! Here is the problem. I need to read in another file (wuglist.txt) containing a list of server names