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
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
> "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
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
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
> 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
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