Brandon,
I took most of your comments and sample data and put it in the following
program. Taking the data out of the program and parsing it from files and
directories, might be a good exercise for you. Generally variables are best
declared close to where they are first used. Since the scope of
Timothy, Shlomi Fish, Rob, jbiskofski ,
Thank you for your directions and inputs.
I am going through them now.
Regards,
Satya
From: timothy adigun [mailto:2teezp...@gmail.com]
Sent: 01 February 2012 05:41
To: Shlomi Fish
Cc: Nemana, Satya; beginners@perl.org
Subject: Re: Perl coding sta
Just my $0.02... can't help offering a slight rewrite of David's great
program.
Now it's runnable on 5.010 and earlier, and should give out some warnings
if hoststatus sections are somehow corrupt:
$|++; # comment it out if you don't need to buffer the output
my $section_started;
my ($host, $state
Hey Brandon
Here is a solution to this problem. It is purposely really long. It takes
the simplest most understandable solution.
If you have questions about it let me know.
#!/usr/local/bin/perl
# always a good idea, forces scope to if/for/foreach/while blocks
use strict;
# open the file, int
Hi jbiskofski,
This script will not work WHY? -- Scalar found where operator expected
at . [ Please Check ] line 72, near "$we_are_inside_hoststatus_block"
..
On Wed, Feb 1, 2012 at 6:38 PM, jbiskofski wrote:
> Hey Brandon
>
> Here is a solution to this problem. It is purposely r
Timothy
Could it be that when you copy pasted the script the line wrap got messed
up? It works fine for me.
Im using perl 5.12.3
Your comment about the open statement is OK. I guess it really comes down
to style. I was trying to write something clear that Brandon could improve
upon.
Here is a p
On 2/1/12 Wed Feb 1, 2012 11:24 AM, "jbiskofski"
scribbled:
> Your comment about the open statement is OK. I guess it really comes down
> to style. I was trying to write something clear that Brandon could improve
> upon.
It is not simply a matter of style. Because of operator precedence, the
s
ah - i get it now.
thanks.
On Wed, Feb 1, 2012 at 3:05 PM, Jim Gibson wrote:
> On 2/1/12 Wed Feb 1, 2012 11:24 AM, "jbiskofski"
> scribbled:
>
> > Your comment about the open statement is OK. I guess it really comes down
> > to style. I was trying to write something clear that Brandon could