CongoGrey has asked for the wisdom of the Perl Monks concerning the following question:
I know that i need to place an if statement where i have the print line. But, i guess i am having an issue with the syntax. I was thinking that it would be something like:open NCNODE, "/path/nervecenter.node" or die "Error opening Nerve Center Node file ($!)"; foreach my $variable (<NCNODE>) { chomp; print STDOUT $variable; } close NCNODE;
But, it does not seem to be correct. Below is a sample of the file.if ($variable eq 'read_community'){ print; }
begin node name Router on_off on group Frame_Relay suppress no auto_delete yes read_community readstring write_community readstring address 10.0.0.0 port 161 snmp_version 1 engineid 0 auth_protocol 0 is_key_ok 1 error_status 0 security_level 0 end node
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Simple Problem getting me Stumped
by KPeter0314 (Deacon) on Jul 01, 2003 at 17:07 UTC | |
by CongoGrey (Sexton) on Jul 01, 2003 at 17:33 UTC | |
|
Re: Simple Problem getting me Stumped
by dws (Chancellor) on Jul 01, 2003 at 17:08 UTC | |
|
Re: Simple Problem getting me Stumped
by ant9000 (Monk) on Jul 01, 2003 at 17:09 UTC |