how to read and process data coming on console

2006-10-27 Thread Mihir Kamdar
hi, I am capturing http transactions by using Net::PcapUtils module. I want to do real time processing on the captured packets. Following is a snippet of data that I am getting: POST /vodexUi/CVodSchedularViewMgr.php HTTP/1.0^M Host: 192.168.1.157^M User-Agent: Mozilla/5.0 (X11; U; Linux i686; e

Help, using script to edit router config (entering different modes automatically)

2006-10-27 Thread Michael Alipio
Hi, Suppose I have an appliance, it's not cisco but the process of updating configuration is almost the same. 1. First you log-in either via ssh or telnet.. 2. Then you go into a certain mode by typing a particular command. 3. Only after you have enter that mode, you can issue the actual editing

Can't access search.cpan.org

2006-10-27 Thread Michael Alipio
Hi, As of 3:43:18 pm here in Manila, Philippines, I can't access search.cpan.org.. Any idea why?

Re: Help, using script to edit router config (entering different modes automatically)

2006-10-27 Thread Michael Alipio
- Original Message From: Bjørge Solli <[EMAIL PROTECTED]> To: beginners@perl.org Sent: Friday, October 27, 2006 3:32:06 PM Subject: Re: Help, using script to edit router config (entering different modes automatically) Tried Net::SSH::Perl? http://search.cpan.org/~dbrobins/Net-SSH-Perl

Re: Help, using script to edit router config (entering different modes automatically)

2006-10-27 Thread Bjørge Solli
On Friday 27 October 2006 09:23, Michael Alipio wrote: > Hi, > > Suppose I have an appliance, it's not cisco but the process of updating > configuration is almost the same. > > 1. First you log-in either via ssh or telnet.. > 2. Then you go into a certain mode by typing a particular command. > 3. O

Re: How to parse UNIX commands ...

2006-10-27 Thread John W. Krahn
[EMAIL PROTECTED] wrote: > Hi all, Hello, > How do I parse or evaluate the output of UNIX commands? > > For example, in UNIX scripts, I can run filesystem=`df -k | awk -F"" ' { print > $6 }'` to check for the mount points. > > How do I achieve the same in Perl? That is, I tried: > > #!/usr/bin

Re: Analize Java source file with perl?

2006-10-27 Thread Dr.Ruud
Ovid schreef: > my $text = do { local $/; <$fh> }; There is a problem with this idiom: it uses about twice the memory of this variant: my $text ; { local $/ ; $text = <$fh> } So if your files can be big (related to the amount of memory available), use the latter. -- Affijn,

Changing colour, font and weight of text in a shell

2006-10-27 Thread Allister Gearon
Hello, is there a simple way to do this? I have had no luck in my searches so far. Perl version 5.8.8 TIA Al -- Public Key to be found at www.keyserver.net. Search for [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

killing processes

2006-10-27 Thread perl pra
hi I need to kill java processes in Unix and windows both based on OS check. here is my code use Switch; my $UKILLSTR="ps -ef |grep java | grep -v grep|kill -9 `awk '{print $2}'` ";(this command work if i put in command prompt of the linux box ) my $UKILLSTR1=" my $WKILLSTR="taskkill /IM java

Re: Spam from this list

2006-10-27 Thread Dr.Ruud
zentara schreef: > Ron Goral: >> Is anyone else receiving spam from this list? I use this email >> address only for this list, so it must be originating from someone >> on it. Any ideas? > > The easiest way to avoid the problem, is to use the newsgroups instead > of the maillists, as described at

how do i use page text method...

2006-10-27 Thread positive mind
i have a query... i am using the Win 32 package for IE automation on Windows. can somebody please help me in using PageText() method ... i have to capture the page text in a variable from a simple html page.Thetext is in the format of few variables like USERNAME=pm, HTTP_CONNECTION=keep-alive et

Quick Net::SSH::Perl question

2006-10-27 Thread Michael Alipio
Hi, My program looks like this: #!/usr/local/bin/perl use warnings; use strict; use Net::SSH::Perl; my $host = '192.168.1.1'; my $user = 'user'; my $pass = 'password'; my $ssh = Net::SSH::Perl->new($host); $ssh->login($user, $pass); $ssh->shell; It spawns a shell successfully but takes too lon

Re: how do i use page text method...

2006-10-27 Thread Rob Dixon
positive mind wrote: i have a query... i am using the Win 32 package for IE automation on Windows. can somebody please help me in using PageText() method ... i have to capture the page text in a variable from a simple html page.Thetext is in the format of few variables like USERNAME=pm, HTTP_CO

Re: Quick Net::SSH::Perl question

2006-10-27 Thread Rob Dixon
Michael Alipio wrote: Hi, My program looks like this: #!/usr/local/bin/perl use warnings; use strict; use Net::SSH::Perl; my $host = '192.168.1.1'; my $user = 'user'; my $pass = 'password'; my $ssh = Net::SSH::Perl->new($host); $ssh->login($user, $pass); $ssh->shell; It spawns a shell succes

how to read and process data coming on console

2006-10-27 Thread Mihir Kamdar
hi, I am capturing http transactions by using Net::PcapUtils module. I want to do real time processing on the captured packets. Following is a snippet of data that I am getting: POST /vodexUi/CVodSchedularViewMgr .php HTTP/1.0^M Host: 192.168.1.157^M User-Agent: Mozilla/5.0 (X11; U; Linux i686;

KILLING Processes in unix

2006-10-27 Thread perl pra
hi I need to kill java processes in Unix and windows both based on OS check. here is my code use Switch; my $UKILLSTR="ps -ef |grep java | grep -v grep|kill -9 `awk '{print $2}'` ";(this command work if i put in command prompt of the linux box ) my $UKILLSTR1=" my $WKILLSTR="taskkill /IM java

win32 services

2006-10-27 Thread Derek B. Smith
Hello, I want to get a listing of Window services and each associated "status" and its "startup type." I looked at Win32::Daemon::Simple but wasn't sure if this is a good module for doing so? W/out using a module, Is there a registry entry for each service I could parse or a database that I

Need to pull matched string plus a few additional bytes

2006-10-27 Thread Phil Miller
I am working on my very first program and have run into a bit of a roadblock. I am trying to print a report of users who show up in an IIS Log file. The good news is that the format of the userid is WINDOWSDOMAIN\USERID. The bad news is that it is not always at the same place in the IIS Log file

Re: win32 services

2006-10-27 Thread Dr.Ruud
"Derek B. Smith" schreef: > I want to get a listing of Window services and each > associated "status" and its "startup type." I looked > at Win32::Daemon::Simple but wasn't sure if this is a > good module for doing so? > > W/out using a module, > Is there a registry entry for each service I coul

Re: Need to pull matched string plus a few additional bytes

2006-10-27 Thread Arnaldo Guzman
On Fri, 2006-10-27 at 09:36 -0400, Phil Miller wrote: > I am working on my very first program and have run into a bit of a > roadblock. I am trying to print a report of users who show up in an IIS > Log file. The good news is that the format of the userid is > WINDOWSDOMAIN\USERID. The bad news

Re: Changing colour, font and weight of text in a shell

2006-10-27 Thread Arnaldo Guzman
On Thu, 2006-10-26 at 21:39 +, Allister Gearon wrote: > Hello, > is there a simple way to do this? I have had no luck in my searches so far. > Perl version 5.8.8 > TIA > Al > -- > > Public Key to be found at www.keyserver.net. > Search for [EMAIL PROTECTED] For colored output see the Color:

Re: Need to pull matched string plus a few additional bytes

2006-10-27 Thread D. Bolliger
Phil Miller am Freitag, 27. Oktober 2006 15:36: > I am working on my very first program and have run into a bit of a > roadblock. I am trying to print a report of users who show up in an IIS > Log file. The good news is that the format of the userid is > WINDOWSDOMAIN\USERID. The bad news is tha

Re: Changing colour, font and weight of text in a shell

2006-10-27 Thread Tom Phoenix
On 10/26/06, Allister Gearon <[EMAIL PROTECTED]> wrote: Subject: Changing colour, font and weight of text in a shell is there a simple way to do this? To tell a shell to do something? Probably; check the documentation for the shell to see what it allows. Is your target really the shell, or

RE: win32 services

2006-10-27 Thread Derek B. Smith
--- Phil Miller <[EMAIL PROTECTED]> wrote: > Try going to > HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services. > > Bear in mind the name of the service does not > directly correlate to the > name of the Registry Key. You have to look up under > each key at the > Value Name DisplayName. I b

open()

2006-10-27 Thread Klaus Jantzen
In a reply by A. Guzman I found the following paragraph: == Please be careful with your open(), you will have problems if you do not use a multiple argument open(), And you shouldn't use bare-word filehandles. == So far I used quite successfully bare-word filehandles except in the cases wh

Re: open()

2006-10-27 Thread Tom Phoenix
On 10/27/06, Klaus Jantzen <[EMAIL PROTECTED]> wrote: Why should one separate the ">" etc. from the file name? Mostly, if the file name might be user-supplied. Perl's open() treats a number of characters as magical, potentially invoking a shell or another program -- but that's dangerous power

ndbm error no 28

2006-10-27 Thread C . R .
Perl 5.6.1 on Solaris While storing a value to a dbm file (hash file) I get this error: "ndbm store returned -1, errno 28, key "11000-120" at excond.pl line 313, line 331." I think I may have reached the limit to the amount of data I can store in a record. What is this limit? 2K? I don't thin

Re: Find all matches in a string via regex

2006-10-27 Thread C . R .
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > C.R. am Mittwoch, 25. Oktober 2006 20:38: > > Well, that kinda worked. I had to change it to work on a scalar so this > > is what I wrote: > > $s=~s/(\d+ +cm)/$1/g; > > > > Input string: 144 cm > > Output string: 144 cm > > > > Why did I

Re: how to read and process data coming on console

2006-10-27 Thread Mumia W.
On 10/27/2006 07:51 AM, Mihir Kamdar wrote: hi, I am capturing http transactions by using Net::PcapUtils module. I want to do real time processing on the captured packets. Following is a snippet of data that I am getting: POST /vodexUi/CVodSchedularViewMgr .php HTTP/1.0^M Host: 192.168.1.157^M

Re: ndbm error no 28

2006-10-27 Thread Mumia W.
On 10/27/2006 11:29 AM, C.R. wrote: Perl 5.6.1 on Solaris While storing a value to a dbm file (hash file) I get this error: "ndbm store returned -1, errno 28, key "11000-120" at excond.pl line 313, line 331." I think I may have reached the limit to the amount of data I can store in a recor

Re: Find all matches in a string via regex

2006-10-27 Thread Rob Dixon
C.R. wrote: > In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] > says... >> C.R. am Mittwoch, 25. Oktober 2006 20:38: >>> Well, that kinda worked. I had to change it to work on a scalar so this >>> is what I wrote: >>> $s=~s/(\d+ +cm)/$1/g; >>> >>> Input string: 144 cm >>> Output string: 144 cm >

goto???

2006-10-27 Thread Shiping Wang
Hello, I try to use following code to check if a file is already exist, if it exists, then ask user to change file name or override it. I know using 'goto' is not preferred way here, but what's the 'right way' to do so? Thanks, Shiping

Re: goto???

2006-10-27 Thread John W. Krahn
Shiping Wang wrote: > Hello, Hello, > I try to use following code to check if a file is already exist, > if it exists, then ask user to change file name or override it. I know > using 'goto' is not preferred way here, but what's the 'right way' to do > so? > > ---

Re: How to pass string in command line argument.

2006-10-27 Thread perl pra
I tried this but no luck.. let me tell me explain my problem in detail to you guys so that you may give me the apt solution. i have perl script that searches given string (the string should be passed in command line argument), The string should be sent to the script with double quotes attached