How to load text into Curses::UI::TextEditor - -text?

2006-10-09 Thread ert weerr
Guys, I'd like to write a perl-based tool that helps me to do my regular system monitoring tasks. It would be running in console mode but using 'windows' to list the command outputs. Curses::UI::TextEditor would be one of the elements that I use to present the output in a nice formatted way. It

Perl Script as a Cron Job

2006-10-09 Thread Mazhar
Hi All, I have prepared a script that is to be run as a cron job every 10 minutes, i have added the same in cron as below, *0,10,20,30,40,50 * * * * /scripts/x.pl* But the above is not running properly, should i add something in the code. Need your inputs on the above Thanks in Advance

Re: Perl Script as a Cron Job

2006-10-09 Thread Bjørge Solli
On Monday 09 October 2006 11:03, Mazhar wrote: I have prepared a script that is to be run as a cron job every 10 minutes, i have added the same in cron as below, *0,10,20,30,40,50 * * * * /scripts/x.pl* You have too many stars, remove the leading and trailing stars, or try: */10 * * * *

Re: Perl Script as a Cron Job

2006-10-09 Thread Jeff Pang
I have prepared a script that is to be run as a cron job every 10 minutes, i have added the same in cron as below, *0,10,20,30,40,50 * * * * /scripts/x.pl* But the above is not running properly, should i add something in the code. Try this: */10 * * * * /scritps/xxx.pl The xxx.pl

Re: Why is Perl a SHE

2006-10-09 Thread Mathew Snyder
zentara wrote: On Sat, 7 Oct 2006 11:19:34 +0200, [EMAIL PROTECTED] (@ Rocteur CC) wrote: Hi, I was just reading The State of the Onion 10 http://www.perl.com/pub/ a/2006/09/21/onion.html by Larry, and if you have not read it I think you will enjoy it. I really ROFL when I saw that

how do i assign variables from a different file..

2006-10-09 Thread positive mind
Greetings !! i am beginer in Perl and have task in hand to do..i got to read lot of variables and parameters which are defined in one file. I have to use these variables in my perl script ..how do i do this...(how do i use the variables in one file in my perl script...) thnx, pm

Re: Perl Script as a Cron Job

2006-10-09 Thread Mazhar
When i add the entry as specified i get the below error (i.e) */10 * * * * /scritps/xxx.pl in cron *crontab: error on previous line; unexpected character found in line.* Regards Mazhar On 10/9/06, Jeff Pang [EMAIL PROTECTED] wrote: I have prepared a script that is to be run as a cron job

Re: How to load text into Curses::UI::TextEditor - -text?

2006-10-09 Thread D. Bolliger
ert weerr am Montag, 9. Oktober 2006 09:24: Guys, Hello I'd like to write a perl-based tool that helps me to do my regular system monitoring tasks. It would be running in console mode but using 'windows' to list the command outputs. Curses::UI::TextEditor would be one of the elements

Re: Perl Script as a Cron Job

2006-10-09 Thread Mazhar
I tried with the below and made my script as executable with chmod command but the same is not running every 10 minutes. Need your help Regards Mazhar On 10/9/06, Hal Wigoda [EMAIL PROTECTED] wrote: get rid of the /. On Oct 9, 2006, at 5:55 AM, Mazhar wrote: When i add the entry as

Problems with Net::Pcap

2006-10-09 Thread Mihir Kamdar
hii, I want to capture all the http packets having all the response information like message type(GET/POST),etc. Also if the method is POST then postbody also I want to capture. I am using Net::Pcap for achieving this. The filter string that I am using is port 80. But the output I am getting is

Re: how do i assign variables from a different file..

2006-10-09 Thread Jeff Pang
i am beginer in Perl and have task in hand to do..i got to read lot of variables and parameters which are defined in one file. I have to use these variables in my perl script ..how do i do this...(how do i use the variables in one file in my perl script...) HELLO, Simply,you can declare all

Re: Why is Perl a SHE

2006-10-09 Thread Mathew
zentara wrote: On Mon, 09 Oct 2006 06:18:58 -0400, [EMAIL PROTECTED] (Mathew Snyder) wrote: zentara wrote: This is perfect for jokes. How about: Those are just bad...real bad. Mathew Snyder So was the question. To rephrase an old statement, there's no such thing as a bad

Re: Problems with Net::Pcap

2006-10-09 Thread Jeff Pang
I want to capture all the http packets having all the response information like message type(GET/POST),etc. Hi, How about using HTTPLook?it's fairly simple and powerful.See: http://www.httpsniffer.com/ -- Jeff Pang NetEase AntiSpam Team http://corp.netease.com -- To unsubscribe, e-mail:

Problems with Net::Pcap

2006-10-09 Thread Mihir Kamdar
hii, I want to capture all the http packets having all the response information like message type(GET/POST),etc. Also if the method is POST then postbody also I want to capture. I am using Net::Pcap for achieving this. The filter string that I am using is port 80. But the output I am getting is

Re: Perl Script as a Cron Job

2006-10-09 Thread Paul Johnson
On Mon, Oct 09, 2006 at 03:23:49PM +0400, Mazhar wrote: I tried with the below and made my script as executable with chmod command but the same is not running every 10 minutes. Once you have worked out your crontab syntax, almost all cron problems are due to permissions or environment. Need

Non-deprecated way to capture array length

2006-10-09 Thread Marc Sacks
I needed to find out the length of an array and did it by referencing the array in scalar context. However, use warnings indicated that this is a deprecated feature. Is there a non-deprecated way to do this (other than looping through the whole array until I run out of elements)? Thanks. --

Re: Non-deprecated way to capture array length

2006-10-09 Thread Jeff Pang
I needed to find out the length of an array and did it by referencing the array in scalar context. However, use warnings indicated that this is a deprecated feature. Is there a non-deprecated way to do this (other than looping through the whole array until I run out of elements)? Thanks.

Re: Non-deprecated way to capture array length

2006-10-09 Thread Derek B. Smith
--- Marc Sacks [EMAIL PROTECTED] wrote: I needed to find out the length of an array and did it by referencing the array in scalar context. However, use warnings indicated that this is a deprecated feature. Is there a non-deprecated way to do this (other than looping through the whole

Re: Non-deprecated way to capture array length

2006-10-09 Thread John W. Krahn
Marc Sacks wrote: I needed to find out the length of an array and did it by referencing the array in scalar context. However, use warnings indicated that this is a deprecated feature. Is there a non-deprecated way to do this (other than looping through the whole array until I run out of

Re: Non-deprecated way to capture array length

2006-10-09 Thread Jeff Pang
I needed to find out the length of an array and did it by referencing the array in scalar context. However, use warnings indicated that this is a deprecated feature. Is there a non-deprecated way to do this (other than looping through the whole array until I run out of elements)? Thanks.

RE: Non-deprecated way to capture array length

2006-10-09 Thread Helliwell, Kim
-Original Message- From: Jeff Pang [mailto:[EMAIL PROTECTED] Sent: Monday, October 09, 2006 7:48 AM To: beginners Subject: Re: Non-deprecated way to capture array length I needed to find out the length of an array and did it by referencing the array in scalar context. However, use

RE: Non-deprecated way to capture array length

2006-10-09 Thread Jeff Pang
-- Perhaps I'm behind the times here, but what's wrong with: my $num = $#array ?? [EMAIL PROTECTED] ~]$ perl -Mstrict -Mwarnings -le 'my @arr=qw/aa bb cc/;print $#arr' 2 [EMAIL PROTECTED] ~]$ perl -Mstrict -Mwarnings -le 'my @arr=qw/aa bb cc/;print scalar @arr' 3 They are not the

RE: Non-deprecated way to capture array length

2006-10-09 Thread Helliwell, Kim
-Original Message- From: Jeff Pang [mailto:[EMAIL PROTECTED] Sent: Monday, October 09, 2006 8:25 AM To: beginners Subject: RE: Non-deprecated way to capture array length -- Perhaps I'm behind the times here, but what's wrong with: my $num = $#array ?? [EMAIL PROTECTED] ~]$ perl

Re: Non-deprecated way to capture array length

2006-10-09 Thread John W. Krahn
Marc Sacks wrote: John W. Krahn wrote: Marc Sacks wrote: I needed to find out the length of an array and did it by referencing the array in scalar context. However, use warnings indicated that this is a deprecated feature. Is there a non-deprecated way to do this (other than looping

Re: how do i assign variables from a different file..

2006-10-09 Thread Ken Foskey
On Mon, 2006-10-09 at 16:24 +0530, positive mind wrote: Greetings !! i am beginer in Perl and have task in hand to do..i got to read lot of variables and parameters which are defined in one file. I have to use these variables in my perl script ..how do i do this...(how do i use the variables

Bad scoping? Bad prototyping?

2006-10-09 Thread Helliwell, Kim
The following test script fails to compile, complaining that there are not enough arguments in the call to sub2. #!/bin/perl sub1(Hello, ); sub1(world\n); sub sub2($str) { print $str; } sub sub1($str) { sub2($str) } The basic problem is that I'm trying to call

Re: Bad scoping? Bad prototyping?

2006-10-09 Thread Andy Greenwood
On 10/9/06, Helliwell, Kim [EMAIL PROTECTED] wrote: The following test script fails to compile, complaining that there are not enough arguments in the call to sub2. #!/bin/perl sub1(Hello, ); sub1(world\n); Are you sure you want sub1 prototyped twice? sub sub2($str) { print

Re: Bad scoping? Bad prototyping?

2006-10-09 Thread John W. Krahn
Helliwell, Kim wrote: The following test script fails to compile, complaining that there are not enough arguments in the call to sub2. #!/bin/perl sub1(Hello, ); sub1(world\n); sub sub2($str) { print $str; } sub sub1($str) { sub2($str) } The basic problem is that

Re: Bad scoping? Bad prototyping?

2006-10-09 Thread John W. Krahn
Andy Greenwood wrote: On 10/9/06, Helliwell, Kim [EMAIL PROTECTED] wrote: The following test script fails to compile, complaining that there are not enough arguments in the call to sub2. #!/bin/perl sub1(Hello, ); sub1(world\n); Are you sure you want sub1 prototyped twice? Those are

Re: Bad scoping? Bad prototyping?

2006-10-09 Thread Aaron Priven
On Oct 9, 2006, at 10:35 AM, Helliwell, Kim wrote: #!/bin/perl sub1(Hello, ); sub1(world\n); sub sub2($str) { print $str; } sub sub1($str) { sub2($str) } Prototyping in perl does not do what you think it does. It does not turn your arguments into variables. All it does is