CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Advanced: Re: [FishMonger] Help with Telnet commands.: Edit Log



cuboidgraphix
User

Jan 22, 2009, 6:55 AM


Views: 5587
Re: [FishMonger] Help with Telnet commands.

Yeah.. the $t->waitfor('/>/') was the problem.. I removed it and it stopped timing out.

You're right about the $t->print($user) ... I guess it's just a bad force of habit that I use the colons.. sowwy. :( (Already fixed it... thanks.)

Well I did want to work with the $data directly as you had showed me before when you stripped them off the \n and worked with it in one line.. but the problem is that I don't know how to do it when dealing with "quotewords". I made several attempts but failed. I'm just not good enough yet ... I'm still learning.

this is a sample of the output.. Same as the last thread.. 'Help me parse this line please'.


Code
# 1684941 Nak    Active   "20 Jan 09 12:14:57" "O%:CBS1:Cells1:MC800BTS1012:MCBTSSubsystem1:Root1:ECC1" MAJOR "AC Power Failure" 
# 1753868 Nak Active "20 Jan 09 16:05:24" "O%:CBS1:Cells1:MC800BTS1006:MCBTSSubsystem1:Root1:RFM2:RadioSector1" MAJOR "PAM output device failure. Reduced output power // FRU:MFRM-2 3 dB reduction"
# 1753886 Nak Active "21 Jan 09 15:15:28" "O%:CBS1:Cells1:MC800BTS1006:MCBTSSubsystem1:Root1:ECC1" MAJOR "Total rectifier current high // PLANCURRHI"
# 1923679 Nak Active "21 Jan 09 20:36:03" "O%:CBS1:Cells1:MC800BTS1008:MCBTSSubsystem1:Root1:CEM1" MINOR "SWERR log threshold exceeded at CEM, please upload the log // [XCEM] SWERR Log"
# 1713589 Nak Active "21 Jan 09 22:41:42" "O%:CBS1:Cells1:MC800BTS1019:MCBTSSubsystem1:Root1:CEM1" MINOR "SWERR log threshold exceeded at CEM, please upload the log // [XCEM] SWERR Log"
# 1784177 Nak Active "22 Jan 09 00:55:13" "O%:CBS1:Cells1:MC800BTS1003:MCBTSSubsystem1:Root1:CEM1" MINOR "Trap log threshold exceeded at CEM, please upload the log // [XCEM] TRAP Log"
# 1852141 Nak Active "22 Jan 09 03:50:38" "O%:CBS1:Cells1:MC800BTS1014:MCBTSSubsystem1:Root1:ECC1" MAJOR "Shelter High Temperature"
# 1876342 Nak Active "22 Jan 09 07:11:19" "O%:CBS1:Cells1:MC800BTS1021:MCBTSSubsystem1:Root1:CEM3" MINOR "SWERR log threshold exceeded at CEM, please upload the log // [XCEM] SWERR Log"



And another question..

on this line in my code..


Code
foreach($faultname =~ /SWERR/){


Is it possible to match for two variables?

for example..

foreach($faultname =~ /SWEER && $activity =~ /Active/){ <-- This doesn't work, but is something like this possible?

Thanks.


(This post was edited by cuboidgraphix on Jan 22, 2009, 7:23 AM)


Edit Log:
Post edited by cuboidgraphix (User) on Jan 22, 2009, 7:16 AM
Post edited by cuboidgraphix (User) on Jan 22, 2009, 7:23 AM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives