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
> 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. I've tried perldoc warnings and
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
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 (
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.
#
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
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
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
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 (
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
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
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
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 :-)
>
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
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
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
"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
[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
>
> >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
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
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]
> -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
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
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
24 matches
Mail list logo