>use a named variable with foreach loops. sure some docs and examples
>show using the default $_ but it can have problems with action at a
>distance. also a name makes the code read better.

Ok, simple enough to do.

>and where does $match get set? it must be from outside the sub so it is
>a global. bad!

Well $match comes from Getopt::Long, it has to be global, no? Now I'm confused:)

>same with status. either declare it locally and return it or do
>something else but don't set globals just to mark something as ok

Soon after posting I realized it was cleaner to return the value...

>more code and data. use Data::Dumper to show exactly what you are
>passing in.

I used Data::Dumper to see what was actually being passed and it takes
the following form:

$VAR1 = 'system status
       system status: Normal

hostname';

Sorry for the noobish question, but I am not sure how to interpret this?
I assumed this was 4 lines of text, but I guess not?

Thanks for the help!
jlc

--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/


Reply via email to