Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. gindelhe

    ?: code question

    Hello. I have the following code to check to make sure an url is up. But I need the ?: or alternative code to return a toggle so I can use and loop to send email so problems can be resolved. Here is the code: #! /usr/sbin/perl -s # modules needed use Watchdog::HTTP; use Mail::Mailer...
  2. gindelhe

    Net::Telnet::cisco and pattern matching problem.

    This Code posted by Rharsh works pretty good except for one part of it. I'm still trying to get my head wrapped around regex so here is the code and what I would like for it to do: my $output1 = '268435456 bytes total, 54460416 bytes free'; my $output2 = '13607 in use, 396980 most used'...
  3. gindelhe

    Net::Telnet::cisco and pattern matching problem.

    Ugh sorry about that. But what I am grabbing is the total amount of memory and the total connections. Here is a sample input that I get and then process from there: Output2 is 13607 in use, 396980 most used Output1 is 268435456 bytes total, 54460416 bytes free I used the following code to...
  4. gindelhe

    Net::Telnet::cisco and pattern matching problem.

    That helped somewhat. But I'm stil ltrying to figure out a way to trap this junk input before it goes on through the rest of my loops. Here is an input: Use of uninitialized value in concatenation (.) or string at fw.pl line 93, <STDIN> line 5. Output2 is Use of uninitialized value in pattern...
  5. gindelhe

    Net::Telnet::cisco and pattern matching problem.

    Hello. I have a script which logs into a PIX to check the number of connections and memory and then strips out what I don't need. But recently I have been having problems with the following error: Use of uninitialized value in pattern match (m//) at fw.pl line 84, <STDIN> line 5. Use of...
  6. gindelhe

    Formating in real time not from a file.

    Hello. I have a script which gets information from a router in real time. I am wondering if it is possible to format this output in real time. Here is what I am looking for: Input1 Input2 Input3 Input4 123456 xx.xx 123 Time What I need is for the format to look nice. Have each...
  7. gindelhe

    Getting input using @variable into a string

    After some trail and error I am getting what I need. Thanks for your help Mikevh! That worked great and I learned a lot. Hal.
  8. gindelhe

    Getting input using @variable into a string

    Okay I made on mistake I'm not very good at regex yet. The second command is in the following format: 123456789 bytes total, 123456789 bytes free I need to grab the numbers bolded. Sorry about that mistake! This code below works great. # If we know it's at the front if ($output2[0] =~...
  9. gindelhe

    Getting input using @variable into a string

    Hello. Sorry if the title doesn't make sense. I have some code that grabs a command from a router and puts it into an @variable. My question is I want to only grab a certain part of the @variable. Here is some of the code: @output2 = $fw->cmd('show conn count'); print @output2; Which would...

Part and Inventory Search

Back
Top