Re: Use of uninitialized value

2005-09-09 Thread Beast
Charles K. Clarkson wrote: Beast wrote: : my $value = get_value_from_external_program; : : How do avoid such warning, because value is coming from : external program thus I can't make sure that it will : return a string or null. What do you want to do with $valu

RE: Use of uninitialized value

2005-09-09 Thread Charles K. Clarkson
Beast wrote: : my $value = get_value_from_external_program; : : How do avoid such warning, because value is coming from : external program thus I can't make sure that it will : return a string or null. What do you want to do with $value when the external program do

RE: Use of uninitialized value

2005-09-09 Thread Rose, Jeff
Possibly use my $value = get_value_from_external_program || "defaultvalue"; -Original Message- From: Beast [mailto:[EMAIL PROTECTED] Sent: Friday, September 09, 2005 11:28 PM To: beginners@perl.org Subject: Use of uninitialized value When using use warnings; I receive this error msg?

Use of uninitialized value

2005-09-09 Thread Beast
When using use warnings; I receive this error msg? Use of uninitialized value in subroutine entry at... --- my $value = get_value_from_external_program; How do avoid such warning, because value is coming from external program thus I can't make sure that it will return a string or null. --

dbiproxy connection failure...

2005-09-09 Thread Mason Loring Bliss
Hi, all! I'm not finding anything on the web about this, so I'm hoping someone here can help. I'm trying to use dbiproxy with PostgreSQL. I'm running Debian Sarge/i386, and the Perl, DBI, and PostgreSQL that come with it. (Perl 5.8.4, DBI 1.46, PostgreSQL 7.4.7) My test script looks like this: u

Re: sendmail, etc.

2005-09-09 Thread Bob Showalter
Matthew Sacks wrote: Greetings, I want to send mail from my perl code. (Boy, that's really unusual) I am thinking using mail::mailer. I need a bit more info than what I have so far found in the online documentation (perldoc -q mail). Where I can I find some advice? E.G., there is always an

Re: sendmail, etc.

2005-09-09 Thread Wiggins d'Anconia
zentara wrote: > On Thu, 8 Sep 2005 19:31:11 -0700 (PDT), [EMAIL PROTECTED] > (Matthew Sacks) wrote: > > >>Greetings, >>I want to send mail from my perl code. (Boy, that's >>really unusual) >> >>I am thinking using mail::mailer. >>I need a bit more info than what I have so far found >>in the

Flash Application Automation through Perl ... possible or not?

2005-09-09 Thread Pranav
Hello List, I am very new to perl, the primary reason why I want to learn perl is ... I need to automate testing of some flash based Applicatons. Till now I haven't got any positive response, most of my friend suggests that its not possible. As Perl cant access/invoke any mouse/keyboard events

Re: getopt long behaviour

2005-09-09 Thread Manish Sapariya
Oh, my understanding is that when I specify "output=s" its a mandatory parameter and if not specified on command line, GetOptions should return error. Am i missing something? Thanks, Manish On 09/09/2005 05:56 PM, Chris Devers wrote: On Fri, 9 Sep 2005, Manish Sapariya wrote: Shouldn't

Re: not sure what $i stands for

2005-09-09 Thread Jeff 'japhy' Pinyan
On Sep 9, Brian Volk said: I see a lot of code that usrs: my $i = 0; Why do so many people use $i ? It is a special variable in PERL maybe for integers? It has no special significance. Many people use it to refer to the *I*ndex of a list or array. People have been using $i as a counter

Re: getopt long behaviour

2005-09-09 Thread Jeff 'japhy' Pinyan
[PLEASE don't top-post; it makes it hard to follow the conversation] On Sep 9, Manish Sapariya said: On 09/09/2005 05:56 PM, Chris Devers wrote: On Fri, 9 Sep 2005, Manish Sapariya wrote: Shouldn't following snippet throw error message when it is called without any parameter? Because this

Re: getopt long behaviour

2005-09-09 Thread Manish Sapariya
Oh, my understanding is that when I specify "output=s" its a mandatory parameter and if not specified on command line, GetOptions should return error. Am i missing something? Thanks, Manish On 09/09/2005 05:56 PM, Chris Devers wrote: On Fri, 9 Sep 2005, Manish Sapariya wrote: Shouldn't fol

not sure what $i stands for

2005-09-09 Thread Brian Volk
Hi All~ I'm sure this will sound like a pretty silly question to most of you but I have been wondering this for a while... and searching Google so I wouldn't have to post this question here... :~) No luck. I see a lot of code that users; my $i = 0; Why do so many people use $i ?

Re: [:alpha:]

2005-09-09 Thread Jeff 'japhy' Pinyan
On Sep 9, Gergely Buday said: while () { if (/^[:alpha:]+$/) { print; } } It seems that my perl (5.8.something) does not understand the [:alpha:] posix syntax. '[:alpha:]' belongs *in* a character class, it is not a character class. if (/^[[:alpha:]]+$/)

Re: catchDate

2005-09-09 Thread Todd W
"John W. Krahn" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Jeff 'japhy' Pinyan wrote: > > On Sep 8, Christopher Spears said: > > > >> I want to catch the various parts of the output of the > >> date command. Here is my script: > >> > >> my $date = system("date"); > > > > > > Yo

[:alpha:]

2005-09-09 Thread Gergely Buday
Hi there, why my regex does not work as I expect? I would like to match the lines consisting of only letters, at least one of them: #!/usr/bin/perl while () { if (/^[:alpha:]+$/) { print; } } It seems that my perl (5.8.something) does not understand the [

Re: getopt long behaviour

2005-09-09 Thread Chris Devers
On Fri, 9 Sep 2005, Manish Sapariya wrote: > Shouldn't following snippet throw error message when > it is called without any parameter? > > I can't see any error messsage, why? Because this didn't have an error. If you want it to quit, force it to quit. #!/usr/bin/perl use Getopt:

getopt long behaviour

2005-09-09 Thread Manish Sapariya
Shouldn't following snippet throw error message when it is called without any parameter? I can't see any error messsage, why? # /tmp/test.pl Executed successfully # -- #!/usr/bin/perl use Getopt::Long; GetOptions("verbose" => \$verbose, "debug"=> \$d

RE: catching output from ping

2005-09-09 Thread Thomas Bätzler
Hi, Christopher Spears <[EMAIL PROTECTED]> wrote: > I've decided to rework my Perl script that pings a blade and > checks for nrnode: > > my @bladeNumbers = @ARGV; > > if (scalar @bladeNumbers == 0) { > print "No blades entered!\n"; > exit; > } if( my @bladeNumbers = @ARGV ){ ## cod

Re: catching output from ping

2005-09-09 Thread Jeff Pan
if (`ping $blade` =~ /$badPing/) {print "$blade: $badPing\n";} change to: my @results=`ping -c1 $blade`; print "$blade:$badPing\n" if grep /$badPing/,@results; On Fri, 9 Sep 2005 01:41:19 -0700 (PDT), "Christopher Spears" <[EMAIL PROTECTED]> said: > I've decided to rework my Perl script that

Re: catching output from ping

2005-09-09 Thread John Doe
Christopher Spears am Freitag, 9. September 2005 10.41: > I've decided to rework my Perl script that pings a > blade and checks for nrnode: use strict; use warnings; > my @bladeNumbers = @ARGV; > if (scalar @bladeNumbers == 0) unless (@bladeNumbers) (A list is evaluated in scalar context when

Re: Parsing and HTML file

2005-09-09 Thread Binish A R
Nath, Alok (STSD) wrote: Hi all, I want to read the data from an HTML file say Test.htm.For that I want to use HTML::TableExtract. Can anybody send me some pointers to write the script or give me some sample script ? Thanx, Alok. perldoc HTML::TableExtract :)

Re: sendmail, etc.

2005-09-09 Thread Ranish
On Friday 09 September 2005 08:01, Matthew Sacks wrote: > Greetings, > I want to send mail from my perl code. (Boy, that's > really unusual) > > I am thinking using mail::mailer. > I need a bit more info than what I have so far found > in the online documentation (perldoc -q mail). > > Where I

catching output from ping

2005-09-09 Thread Christopher Spears
I've decided to rework my Perl script that pings a blade and checks for nrnode: my @bladeNumbers = @ARGV; if (scalar @bladeNumbers == 0) { print "No blades entered!\n"; exit; } foreach $_(@bladeNumbers) { my $blade = "blade-".$_; print "$blade\n"; my $badPing = "Destination Hos