RE: suppressing Use of uninitialized value in pattern match (m//)

2009-06-08 Thread Ajay Kumar
d value in pattern match (m//) How can I suppress the first "Use of uninitialized value in pattern match (m//)" warning message. code and output are below. code # cat ./fix_archive.pl #!/usr/bin/perl use warnings; use strict; my @files = <*> unless /.mbox^/; fore

Re: suppressing Use of uninitialized value in pattern match (m//)

2009-05-28 Thread Dr.Ruud
admin2 wrote: How can I suppress the first "Use of uninitialized value in pattern match (m//)" warning message. code and output are below. Don't suppress a message, but fix the problem. my @files = <*> unless /.mbox^/; This is the only pattern match in your script

suppressing Use of uninitialized value in pattern match (m//)

2009-05-28 Thread admin2
How can I suppress the first "Use of uninitialized value in pattern match (m//)" warning message. code and output are below. code # cat ./fix_archive.pl #!/usr/bin/perl use warnings; use strict; my @files = <*> unless /.mbox^/; foreach my $file (@files) {

Re: suppressing Use of uninitialized value in pattern match (m//)

2009-05-27 Thread John W. Krahn
admin2 wrote: How can I suppress the first "Use of uninitialized value in pattern match (m//)" warning message. code and output are below. code # cat ./fix_archive.pl #!/usr/bin/perl use warnings; use strict; my @files = <*> unless /.mbox^/; That line read

suppressing Use of uninitialized value in pattern match (m//)

2009-05-27 Thread admin2
How can I suppress the first "Use of uninitialized value in pattern match (m//)" warning message. code and output are below. code # cat ./fix_archive.pl #!/usr/bin/perl use warnings; use strict; my @files = <*> unless /.mbox^/; foreach my $file (@files) { p

Re: Uninitialized value in pattern match

2008-03-31 Thread Rob Dixon
Johan wrote: > > The last line of this code > foreach $PkgFile( @$PkgList ) > { > if( $PkgFile =~m/^\s*$/) > > gives this warning message > Use of uninitialized value in pattern match (m//) at packagefile.pm > line 838. > > How can I solve this? (

Re: Uninitialized value in pattern match

2008-03-31 Thread Rob Coops
> > gives this warning message > Use of uninitialized value in pattern match (m//) at packagefile.pm > line 838. > > How can I solve this? (I have no idea what the code does...) > > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > http://learn.perl.org/ > > >

Uninitialized value in pattern match

2008-03-31 Thread Johan
The last line of this code foreach $PkgFile( @$PkgList ) { if( $PkgFile =~m/^\s*$/) gives this warning message Use of uninitialized value in pattern match (m//) at packagefile.pm line 838. How can I solve this? (I have no idea what the code does...) -- To unsubscribe, e-mail: [EMAIL

Re: Use of uninitialized value in pattern match (m//)

2007-12-05 Thread Ankur Jain
he following code and receiving the warning : > > > > Use of uninitialized value in pattern match (m//) at a.pl line 15. > > > > > > a.pl : > > / > > > **/ > &g

Re: Use of uninitialized value in pattern match (m//)

2007-12-04 Thread [EMAIL PROTECTED]
On Dec 4, 2:47 pm, [EMAIL PROTECTED] (Rob Dixon) wrote: > [EMAIL PROTECTED] wrote: > >my ($n,$d) = split /\./, shift, 2; > > which specifies the field count in two ways: the third parameter says > that the string should be split into (a maximum of) two parts. and even > if that wasn't there the

Re: Use of uninitialized value in pattern match (m//)

2007-12-04 Thread [EMAIL PROTECTED]
On Dec 4, 2:47 pm, [EMAIL PROTECTED] (Rob Dixon) wrote: > [EMAIL PROTECTED] wrote: > > As it happens, even if there was a '.' as the last character in your > > input string then you'd still get the same message. This is counter- > > intuitive but is documented in the documentation of the split() >

Re: Use of uninitialized value in pattern match (m//)

2007-12-04 Thread Rob Dixon
Ankur wrote: I am running the following code and receiving the warning : Use of uninitialized value in pattern match (m//) at a.pl line 15. a.pl : / **/ sub CommaFormatted{ my $delimiter

Re: Use of uninitialized value in pattern match (m//)

2007-12-04 Thread Rob Dixon
[EMAIL PROTECTED] wrote: > On Dec 4, 7:25 am, [EMAIL PROTECTED] (Ankur) wrote: I am running the following code and receiving the warning : Use of uninitialized value in pattern match (m//) at a.pl line 15. That is to be expected. a

Re: Use of uninitialized value in pattern match (m//)

2007-12-04 Thread [EMAIL PROTECTED]
On Dec 4, 7:25 am, [EMAIL PROTECTED] (Ankur) wrote: > Hi > > I am running the following code and receiving the warning : > > Use of uninitialized value in pattern match (m//) at a.pl line 15. That is to be ex

Use of uninitialized value in pattern match (m//)

2007-12-04 Thread Ankur
Hi I am running the following code and receiving the warning : Use of uninitialized value in pattern match (m//) at a.pl line 15. a.pl : / **/ sub CommaFormatted{ my $delimiter = ','; # replac

Re: Use of uninitialized value in pattern match ..., <> chunk 2

2005-02-23 Thread John W. Krahn
mark McWilliams wrote: What is the following telling me , especially the chunk 2? Use of uninitialized value in pattern match (m//) at ./lo line 27, <> chunk 2 That means that the variable that is bound to the pattern match contains the value undef. "chunk 2" means that you are c

Use of uninitialized value in pattern match ..., <> chunk 2

2005-02-23 Thread mark McWilliams
What is the following telling me , especially the chunk 2? Use of uninitialized value in pattern match (m//) at ./lo line 27, <> chunk 2 I used if (defined ... to get rid of a few other errors. this is in reference to the following code edited to reduce size while (defined($in = <>

RE: Use of uninitialized value in pattern match (m//)

2005-02-13 Thread Charles K. Clarkson
mark McWilliams <mailto:[EMAIL PROTECTED]> wrote: mark McWilliams <[EMAIL PROTECTED]> wrote: : I do not know how to get rid of this error : Use of uninitialized value in pattern match (m//) : : Use of uninitialized value in pattern match (m//) at : ./2new.pl line 97, <> line

Use of uninitialized value in pattern match (m//)

2005-02-13 Thread mark McWilliams
I do not know how to get rid of this error Use of uninitialized value in pattern match (m//) This is were the error is if ( defined $modem{$Ascend_Xmit_Rate} =~ /\d/) { print " __\t modem{Ascend_X_Rate}_\t __\n";

Re: Use of uninitialized value in pattern match (m//) at ./getopt.pl line 14.

2003-12-14 Thread Owen
On Sat, 13 Dec 2003 18:12:17 +0100 Jerry Rocteur <[EMAIL PROTECTED]> wrote: > I'm trying to be a good boy and use strict and warnings .. > > The more I do, the more I feel I'm wasting so much time and should > become productive, my code looks full of 'my' Because so many people in c.l.p.m said

RE: Use of uninitialized value in pattern match (m//) at ./getopt.pl line 14.

2003-12-14 Thread Bakken, Luke
> uninitialized value in > pattern match (m//) at ./getopt.pl line 14.' Use the standard Getopt::Std module to process options. Don't do it yourself. > Line 14 is the while line.. > > I've tried all sorts of stuff with defined but keep getting syntax > errors

Re: Use of uninitialized value in pattern match (m//) at ./getopt.pl line 14.

2003-12-14 Thread Jerry Rocteur
ttle routing gives me 'Use of uninitialized value in pattern match (m//) at ./getopt.pl line 14.' Line 14 is the while line.. I've tried all sorts of stuff with defined but keep getting syntax errors. I've tried perldoc warnings and perldoc perllexwarn .. In any case, unl

Use of uninitialized value in pattern match (m//) at ./getopt.pl line 14.

2003-12-14 Thread Jerry Rocteur
lies. My DBI Perl is even more of a headache ;-(( Anyway, enough whining, now I've going through code that is working and thought I'd see the big difference if I change it to use warnings and strict and this little routing gives me 'Use of uninitialized value in pattern match (

Re: Use of uninitialized value in pattern match (m//) at ./getopt.pl line 14.

2003-12-13 Thread drieux
On Dec 13, 2003, at 10:01 AM, Wiggins d'Anconia wrote: [.. A decent template, any gurus have improvements? [..] my stock gag, looks like: my $opt = parse_cmd_line_options(); ... #--- # These are the Subs for the parse_cmd_line_options. #

Re: Use of uninitialized value in pattern match (m//) at ./getopt.pl line 14.

2003-12-13 Thread R. Joseph Newton
Wiggins d'Anconia wrote: > More code showing specifically why I have been rambling about $_ in the > last couple of days. If you are going to shift off the argument list > why not just do it in the while loop when you are setting $_? Thanks, Wiggins, and keep on rambling. The point needs reiter

Re: Use of uninitialized value in pattern match (m//) at ./getopt.pl line 14.

2003-12-13 Thread Rob Dixon
ing and > thought I'd see the big difference if I change it to use warnings and > strict and this little routing gives me 'Use of uninitialized value in > pattern match (m//) at ./getopt.pl line 14.' > > Line 14 is the while line.. 'use warnings' will moan at

Re: Use of uninitialized value in pattern match (m//) at ./getopt.pl line 14.

2003-12-13 Thread Wiggins d'Anconia
er coding in Perl for 3+ years... Anyway, enough whining, now I've going through code that is working and thought I'd see the big difference if I change it to use warnings and strict and this little routing gives me 'Use of uninitialized value in pattern match (m//) at ./getopt

Use of uninitialized value in pattern match (m//) at ./getopt.pl line 14.

2003-12-13 Thread Jerry Rocteur
lies. My DBI Perl is even more of a headache ;-(( Anyway, enough whining, now I've going through code that is working and thought I'd see the big difference if I change it to use warnings and strict and this little routing gives me 'Use of uninitialized value in pattern match (

Re: Use of uninitialized value in pattern match (m//) at ...

2003-06-26 Thread Singing Banzo
03 6:29 PM Subject: Re: Use of uninitialized value in pattern match (m//) at ... > Singing Banzo wrote: > > > > I think this is a very basic warning, but I coudn't find the way to avoid it > > (tried google, faq, and archive): > > > > Use of uninitialized value

Re: Use of uninitialized value in pattern match (m//) at ...

2003-06-26 Thread John W. Krahn
Singing Banzo wrote: > > I think this is a very basic warning, but I coudn't find the way to avoid it > (tried google, faq, and archive): > > Use of uninitialized value in pattern match (m//) at poComen.cgi line 138. > > line 138: > if ($q->param('template

Use of uninitialized value in pattern match (m//) at ...

2003-06-26 Thread Singing Banzo
I think this is a very basic warning, but I coudn't find the way to avoid it (tried google, faq, and archive): Use of uninitialized value in pattern match (m//) at poComen.cgi line 138. line 138: if ($q->param('template') =~ /^[1234]$/) { # trying to find out if the value of a

Re: Use of uninitialized value in pattern match (m//) at test.pl line 85.

2003-02-03 Thread Paul Johnson
On Mon, Feb 03, 2003 at 11:08:37AM -, Rob Dixon wrote: > Paul Johnson wrote: > > But 5.10 will (probably) introducde the // operator which will allow > > you to say: > > > > $var //= 10; > > Where do you get this insider information Paul? Keeping up with development :-) >

Re: Use of uninitialized value in pattern match (m//) at test.pl line 85.

2003-02-03 Thread Rob Dixon
Paul Johnson wrote: > It probably sits better with something like: > > $var = 10 unless defined $var; > > But 5.10 will (probably) introducde the // operator which will allow > you to say: > > $var //= 10; Where do you get this insider information Paul? And what's this operator going to do? Pr

Re: Use of uninitialized value in pattern match (m//) at test.pl line 85.

2003-02-02 Thread Paul Johnson
On Mon, Feb 03, 2003 at 11:57:29AM +1100, simran wrote: > On Mon, 2003-02-03 at 09:37, Rob Dixon wrote: > > "John W. Krahn" <[EMAIL PROTECTED]> wrote in message > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > [EMAIL PROTECTED] wrote: > > > > > > > > $var|=10; # like that if u want to set the

Re: Use of uninitialized value in pattern match (m//) at test.pl line 85.

2003-02-02 Thread simran
perhaps such a statement would suit: $var = defined $var ? $var : 10; On Mon, 2003-02-03 at 09:37, Rob Dixon wrote: > "John W. Krahn" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > [EMAIL PROTECTED] wrote: > > > > > > $var|=10; # like that if u want to se

Re: Use of uninitialized value in pattern match (m//) at test.pl line 85.

2003-02-02 Thread Rob Dixon
"John W. Krahn" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > [EMAIL PROTECTED] wrote: > > > > $var|=10; # like that if u want to set the variable to a default value-- > > # if the $var is not defined it assigns a value of 10 to it. > > You need to

Re: Use of uninitialized value in pattern match (m//) at test.pl line 85.

2003-02-02 Thread John W. Krahn
[EMAIL PROTECTED] wrote: > > $var|=10; # like that if u want to set the variable to a default value-- > # if the $var is not defined it assigns a value of 10 to it. You need to use the ||= operator not the |= operator for that. John -- use Perl; program fulfillment -- To unsubscri

Re: Use of uninitialized value in pattern match (m//) at test.pl line 85.

2003-02-02 Thread km
> > >How can I get around this "warning" > > > > Use of uninitialized value in pattern match (m//) at test.pl line 85. > > > > For some reason I always get driveNum=2. > > > > I am using warinig and strict in my code.. > > > [snip c

Re: Use of uninitialized value in pattern match (m//) at test.pl line 85.

2003-02-01 Thread R. Joseph Newton
chad kellerman wrote: > Hi guys, > >How can I get around this "warning" > > Use of uninitialized value in pattern match (m//) at test.pl line 85. Hi Chad, Please send your code again with line 85 marked. You have that information in front of you, while we are a

Re: Use of uninitialized value in pattern match (m//) at test.pl line 85.

2003-02-01 Thread Rob Dixon
Chad Kellerman wrote: > Hi guys, > >How can I get around this "warning" > > Use of uninitialized value in pattern match (m//) at test.pl line 85. > > For some reason I always get driveNum=2. > > I am using warinig and strict in my code.. > [snip code]

RE: Use of uninitialized value in pattern match (m//) at test.pl line 85.

2003-02-01 Thread NYIMI Jose (BMB)
> -Original Message- > From: chad kellerman [mailto:[EMAIL PROTECTED]] > Sent: Saturday, February 01, 2003 6:38 PM > To: [EMAIL PROTECTED] > Subject: Use of uninitialized value in pattern match (m//) at > test.pl line 85. > > > Hi guys, > >H

RE: Use of uninitialized value in pattern match (m//) at test.pl line 85.

2003-02-01 Thread NYIMI Jose (BMB)
e punctuation variables, you cannot currently use my() on "$^W", only local(). HTH, José. > -Original Message- > From: chad kellerman [mailto:[EMAIL PROTECTED]] > Sent: Saturday, February 01, 2003 6:38 PM > To: [EMAIL PROTECTED] > Subject: Use

Use of uninitialized value in pattern match (m//) at test.pl line 85.

2003-02-01 Thread chad kellerman
Hi guys, How can I get around this "warning" Use of uninitialized value in pattern match (m//) at test.pl line 85. For some reason I always get driveNum=2. I am using warinig and strict in my code.. if ($pong->ping($mslRef{$server}{ip})) { #check