Re: script help

2007-08-04 Thread Mr. Shawn H. Corey
Tony Heal wrote: Below is a script I have been working on that verifies if another script has created the MD5 hash file correctly. The below works with if ( $checkFile = $file ) This assigns the content of $file to $checkFile and executes the block if it's content is not false (i

Re: Script help

2003-08-16 Thread Ramprasad
Keith Olmstead wrote: Hello, I am neeing some help on a script that I am writing. Here is what I have so far: my $startdir = "/opt/log/hosts/"; use File::Find; #use strict; use warnings; my @dirlist; @logfile = ("cron","messages","maillog","ldap"); foreach $log (@logfile) { sub eachFile { if

Re: Script Help Please

2001-11-26 Thread Randal L. Schwartz
> "Craig" == Craig Sharp <[EMAIL PROTECTED]> writes: Craig> my %servers; (This is defining a hash?) Craig> open (I understand) Craig> { Craig> chomp (my @temp = ); (Removing the newline from each entry) Craig> @server{ @temp } =(); (What's this do?); Craig> } It's a hash slice, which contra

Re: Script Help Please

2001-11-26 Thread Craig Sharp
John, Thanks for the info. I am a bit confused in the first part of the script. my %servers; (This is defining a hash?) open (I understand) { chomp (my @temp = ); (Removing the newline from each entry) @server{ @temp } =(); (What's this do?); } Thanks, Craig >>> "John W. Krahn" <[EMAIL PROT

Re: Script Help Please

2001-11-26 Thread John W. Krahn
Craig Sharp wrote: > > 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

RE: Script Help Please

2001-11-26 Thread Jonathan E. Paton
> Can anyone confirm if I understand this right: > > if ( $username =~ /@/ ) > { >$_ = $username; >($username) = /(.*)\@/; > } > > The part > ($username) = /(.*)\@/; > removes the @ symbol? Yes, but what if you've got two @'s? ;-) The two lines in the 'if' can be rewritten as: $us

RE: Script Help Please

2001-11-26 Thread Scott Ryan
Can anyone confirm if I understand this right: if ( $username =~ /@/ ) { $_ = $username; ($username) = /(.*)\@/; } The part ($username) = /(.*)\@/ this removes the @ symbol ?? Does it do anything else? -Original Message- From: Craig Sharp [mailto:[EMAIL PROTECTED]] Sent: 26 Novem