Re: Warnings::Unused Linux perl

2017-11-06 Thread Martin McCormick
Shlomi Fish <shlo...@shlomifish.org> writes: > Hi Martin, > > please see https://metacpan.org/release/warnings-unused as well as > http://perl-begin.org/topics/cpan/wrappers-for-distributions/ and > http://perl-begin.org/topics/cpan/ . It should not be hard to install and

Re: Warnings::Unused Linux perl

2017-11-06 Thread Martin McCormick
Shlomi Fish <shlo...@shlomifish.org> writes: > Hi, > > The problem may have been the https://en.wikipedia.org/wiki/Letter_case . > That > module has no uppercase letters. That is exactly what it was. This was as easy as falling off the proverbial log cpanp -i warnings:

Re: Warnings::Unused Linux perl

2017-11-06 Thread Shlomi Fish
Hi, On Sun, 05 Nov 2017 18:21:25 -0600 "Martin McCormick" <marti...@suddenlink.net> wrote: > Shlomi Fish <shlo...@shlomifish.org> writes: > > Hi Martin, > > > > please see https://metacpan.org/release/warnings-unused as well as > > http://perl

Re: Warnings::Unused Linux perl

2017-11-05 Thread Martin McCormick
Shlomi Fish <shlo...@shlomifish.org> writes: > Hi Martin, > > please see https://metacpan.org/release/warnings-unused as well as > http://perl-begin.org/topics/cpan/wrappers-for-distributions/ and > http://perl-begin.org/topics/cpan/ . It should not be hard to install and

Re: Warnings::Unused Linux perl

2017-11-05 Thread Shlomi Fish
On Sun, 05 Nov 2017 16:51:09 -0600 "Martin McCormick" <marti...@suddenlink.net> wrote: > Most of the work I did in perl was on a FreeBSD system and not > surprisingly, perl under Linux behaves essentially the same but > one thing I notice is that Warnings::Unused doe

Warnings::Unused Linux perl

2017-11-05 Thread Martin McCormick
Most of the work I did in perl was on a FreeBSD system and not surprisingly, perl under Linux behaves essentially the same but one thing I notice is that Warnings::Unused doesn't appear as a module. It is quite useful in keeping one's code free of clutter so the question is whether

Re: Warnings when sorting by hashref

2017-04-11 Thread Chris Fedde
I like to define a value subroutine. sub myvalue { return uc($options{$_[0]}->{type} // "") } This particular one returns the empty string ("") if $options{$_[0]}->{type} is undefined. Now the sort becomes: sort {myvalue($a) cmp myvalue($b)} keys %options This code is

Re: Warnings when sorting by hashref

2017-04-11 Thread Jim Gibson
> On Apr 11, 2017, at 6:13 AM, Mike Martin wrote: > > Hi > > I have the following code as an example against a hash of hashes, to sort by > hashrf key > > foreach my $opt (sort {uc($options{$b}->{type}) cmp uc($options{$a}->{type})} > keys %options){ >my

Warnings when sorting by hashref

2017-04-11 Thread Mike Martin
Hi I have the following code as an example against a hash of hashes, to sort by hashrf key foreach my $opt (sort {uc($options{$b}->{type}) cmp uc($options{$a}->{type})} keys %options){ my $type=$options{$opt}->{vtype}; $video_type->append_text($type) if defined($type)

Re: warnings in Math::Complex

2017-02-09 Thread Jim Gibson
> On Feb 9, 2017, at 7:39 AM, Simon Bauer <simo...@web.de> wrote: > > Hi, > > when I turn on -W in one of my perl scripts then I get a lot of warnings > concerning Math::Complex > > Prototype mismatch: sub Math::Complex::abs (_) vs none at > /usr/share/p

Re: warnings in Math::Complex

2017-02-09 Thread Andy Bach
On Thu, Feb 9, 2017 at 9:39 AM, Simon Bauer <simo...@web.de> wrote: > when I turn on -W in one of my perl scripts then I get a lot of warnings > concerning Math::Complex > > Prototype mismatch: sub Math::Complex::abs (_) vs none at > /usr/share/perl/5.22/Math/Complex.pm l

warnings in Math::Complex

2017-02-09 Thread Simon Bauer
Hi,   when I turn on -W in one of my perl scripts then I get a lot of warnings concerning Math::Complex    Prototype mismatch: sub Math::Complex::abs (_) vs none at /usr/share/perl/5.22/Math/Complex.pm line 667.  Prototype mismatch: sub Math::Complex::sqrt (_) vs none at /usr/share/perl/5.22

Re: carp and cgi warnings

2016-02-20 Thread lee
Uri Guttman <u...@stemsystems.com> writes: > On 02/14/2016 01:09 AM, Uri Guttman wrote: >> On 02/13/2016 02:07 PM, lee wrote: >>> Brock Wilcox <awwa...@thelackthereof.org> writes: >>> >>>> Greetings! >>>> >>>> Cou

carp and cgi warnings

2016-02-13 Thread lee
Hi, is there a way to disable the annoying warnings about carp and cgi which cgi programs write to the web-server's log file in a general way rather than per program? Same goes for smartmatch warnings. The log file is overloaded with these useless messages, which makes it difficult to find

Re: carp and cgi warnings

2016-02-13 Thread Brock Wilcox
Greetings! Could you give an example of these warnings, and even better some minimal code that generates them? Thanks, --Brock On Feb 13, 2016 8:19 AM, "lee" <l...@yagibdah.de> wrote: > Hi, > > is there a way to disable the annoying warnings about carp and cgi w

Re: carp and cgi warnings

2016-02-13 Thread Nathan Hilterbrand
On 02/13/2016 07:33 AM, lee wrote: Hi, is there a way to disable the annoying warnings about carp and cgi which cgi programs write to the web-server's log file in a general way rather than per program? Same goes for smartmatch warnings. The log file is overloaded with these useless messages

Re: carp and cgi warnings

2016-02-13 Thread lee
Brock Wilcox <awwa...@thelackthereof.org> writes: > Greetings! > > Could you give an example of these warnings, and even better some minimal > code that generates them? Something like this gives you warnings in apaches error.log: #!/usr/bin/perl # use strict; use warnings;

Re: carp and cgi warnings

2016-02-13 Thread lee
Nathan Hilterbrand <noset...@cotse.net> writes: > On 02/13/2016 07:33 AM, lee wrote: >> Hi, >> >> is there a way to disable the annoying warnings about carp and cgi which >> cgi programs write to the web-server's log file in a general way rather >> than

Re: carp and cgi warnings

2016-02-13 Thread Uri Guttman
On 02/14/2016 01:09 AM, Uri Guttman wrote: On 02/13/2016 02:07 PM, lee wrote: Brock Wilcox <awwa...@thelackthereof.org> writes: Greetings! Could you give an example of these warnings, and even better some minimal code that generates them? Something like this gives you warnings in a

Re: carp and cgi warnings

2016-02-13 Thread Uri Guttman
On 02/13/2016 02:07 PM, lee wrote: Brock Wilcox <awwa...@thelackthereof.org> writes: Greetings! Could you give an example of these warnings, and even better some minimal code that generates them? Something like this gives you warnings in apaches error.log: #!/usr/bin/perl # use stric

Re: Is There a Way to Make Uninitialized Warnings Fatal?

2014-12-11 Thread Shawn H Corey
On Wed, 10 Dec 2014 17:04:42 -0500 Uri Guttman u...@stemsystems.com wrote: it is called magic goto for that reason. it isn't really a sub call but a replacement of the current sub with the called one. no stack work is done and @_ is passed as is. it is very valuable when used like that but

Is There a Way to Make Uninitialized Warnings Fatal?

2014-12-10 Thread Martin G. McCormick
We've all seen and probably pounded the table a few times when that Use of uninitialized value warning pops up. Recently a worker in our group ran a script I wrote and got that warning due to an unforeseen circumstance. Unfortunately since the script continues to run, the caller

Re: Is There a Way to Make Uninitialized Warnings Fatal?

2014-12-10 Thread Nathan Hilterbrand
On 12/10/2014 12:32 PM, Martin G. McCormick wrote: We've all seen and probably pounded the table a few times when that Use of uninitialized value warning pops up. Recently a worker in our group ran a script I wrote and got that warning due to an unforeseen circumstance.

Re: Is There a Way to Make Uninitialized Warnings Fatal?

2014-12-10 Thread Shawn H Corey
On Wed, 10 Dec 2014 11:32:16 -0600 Martin G. McCormick mar...@server1.shellworld.net wrote: it made me wonder if there is a way to cause a perl program to die if that condition exists? See `perldoc warnings` and search for /Fatal Warnings/ http://perldoc.perl.org/warnings.html#Fatal-Warnings

Re: Is There a Way to Make Uninitialized Warnings Fatal?

2014-12-10 Thread Martin G. McCormick
Nathan Hilterbrand writes: Just firing from memory here... my $warning_occured = 0; my $default_warn = $SIG{__WARN__}; $SIG{__WARN__} = sub { $warning_occured = 1; $default_warn(@_); } Then in later code: if ($warning_occured) { # Code to run if a warning

Re: Is There a Way to Make Uninitialized Warnings Fatal?

2014-12-10 Thread Martin G. McCormick
Nathan Hilterbrand writes: Just firing from memory here... That was extremely good from memory. I tried the code and it just worked except for one line which appears that it should cause the warning to be printed since we are catching a signal and probably need to recreate the warning by feeding

Re: Is There a Way to Make Uninitialized Warnings Fatal?

2014-12-10 Thread nosettle
@perl.org /divdivCc: /divdivSubject: Re: Is There a Way to Make Uninitialized Warnings Fatal? /divdiv /divNathan Hilterbrand writes: Just firing from memory here... That was extremely good from memory. I tried the code and it just worked except for one line which appears that it should cause

Re: Is There a Way to Make Uninitialized Warnings Fatal?

2014-12-10 Thread Andy Bach
$default_warn is undef. If you define a SIG{__WARN__}, it takes over for the normal handler, which is still available via warn() use warnings; my $ho; my $warning_occured = 0; #my $default_warn = $SIG{__WARN__}; $SIG{__WARN__} = sub { $warning_occured = 1; warn(my: , @_); }; print $ho

Re: Is There a Way to Make Uninitialized Warnings Fatal?

2014-12-10 Thread Uri Guttman
On 12/10/2014 04:14 PM, Andy Bach wrote: my $ho; my $warning_occured = 0; #my $default_warn = $SIG{__WARN__}; $SIG{__WARN__} = sub { $warning_occured = 1; warn(my: , @_); }; print $ho; if ($warning_occured) { print sent warning\n;# Code to run if a warning occured

Re: Is There a Way to Make Uninitialized Warnings Fatal?

2014-12-10 Thread Andy Bach
and show it was my call of warn, not the system. but you are calling warn there which may not work that way as it is builtin. It is, apparently different. Looked at perldoc for perlipc and perlwarnings and tried warn; warn(); warnings::warn(); use warnings::register; warnings

Re: Is There a Way to Make Uninitialized Warnings Fatal?

2014-12-10 Thread Uri Guttman
On 12/10/2014 04:55 PM, Andy Bach wrote: On Wed, Dec 10, 2014 at 3:21 PM, Uri Guttman u...@stemsystems.com mailto:u...@stemsystems.com wrote: the way to do that is to modify @_ in the calling routine and then calling the sub with . in your the win there isn't just sharing the

Re: Stopping undefined warnings

2014-06-23 Thread SSC_perl
of extra work. Does anyone know of a way to suppress all uninitialized warnings to the log? That way, I wouldn't have to add extra code throughout the script just to stop those. CGI::Carp allows you to send 'fatalsToBrowser' but I can't find an equivalent 'fatalsToLog

Re: Stopping undefined warnings

2014-06-23 Thread SSC_perl
I just realized that I can add no warnings 'uninitialized'; to the entire script, which probably makes my last question moot. Unless there's an answer that someone likes better, just disregard that question. I can't think straight with this cold. Not that I need an excuse

Stopping undefined warnings

2014-06-17 Thread SSC_perl
What's the best way to stop undefined warnings for code like this: $data-{'image'} = CopyTempFile('image') if ($main::global-{'admin'} $main::global-{'form'}-{'image_upload'} ne ''); CGI::Carp gives the following: [Tue Jun 17 14:54:36 2014] admin.cgi: Use of uninitialized

Re: Stopping undefined warnings

2014-06-17 Thread Jim Gibson
On Jun 17, 2014, at 1:02 PM, SSC_perl wrote: What's the best way to stop undefined warnings for code like this: $data-{'image'} = CopyTempFile('image') if ($main::global-{'admin'} $main::global-{'form'}-{'image_upload'} ne ''); CGI::Carp gives the following: [Tue Jun 17

Re: Stopping undefined warnings

2014-06-17 Thread Andy Bach
undefined warnings. Well, it might if {form} is a missing level: $ cat /tmp/h.pl #!perl use strict; use warnings; my $global ; $global-{ form} = {image_upload = image} ; my $upload = $global-{form}-{image_upload} ; print form: $upload\n; $upload = $global-{fom}-{image_upload} ; print fom: $upload

Re: suppress the warnings output

2014-05-20 Thread Yonghua Peng
Hi, I have resolved the problem by adding a PrintError = 0 when creating the $dbh object. my $success = try {      $dbh = DBI-connect(dbi:mysql:database=$db;host=$host;port=$port, $user, $passwd, {RaiseError=1,PrintError=0} ) or croak $DBI::errstr;     1; } catch {     _write_log($_);    

Re: suppress the warnings output

2014-05-20 Thread 'lesleyb'
On Tue, May 20, 2014 at 01:51:44PM +0400, Yonghua Peng wrote: Hi, I have resolved the problem by adding a PrintError = 0 when creating the $dbh object. my $success = try {      $dbh = DBI-connect(dbi:mysql:database=$db;host=$host;port=$port, $user, $passwd, {RaiseError=1,PrintError=0}

suppress the warnings output

2014-05-19 Thread Yonghua Peng
Hello members, I wrote the code like below: try {      $dbh = DBI-connect(dbi:mysql:database=$db;host=$host;port=$port, $user, $passwd) or croak $DBI::errstr; } catch {     if ($_) {         write_log($_);         exit 1;     } }; The problem is, when the connection fails, it write the error

Re: Importing subs + strict and warnings using Exporter

2014-03-31 Thread Octavian Rasnita
From: Ruud H.G. van Tol rv...@isolution.nl On 2014-03-30 19:10, Octavian Rasnita wrote: From: Dr.Ruud rvtol+use...@isolution.nl On 2014-03-30 12:26, Octavian Rasnita wrote: But I also want that module to export strict and warnings. http://search.cpan.org/perldoc?Modern%3A%3APerl Thanks

Importing subs + strict and warnings using Exporter

2014-03-30 Thread Octavian Rasnita
Hello, I am trying to create a module that exports a few subroutines in the script that uses it. This is OK, very simple to do using Exporter. But I also want that module to export strict and warnings. If I don't use Exporter in the module, I can make it to export strict and warnings, using

Re: Importing subs + strict and warnings using Exporter

2014-03-30 Thread Dr.Ruud
On 2014-03-30 12:26, Octavian Rasnita wrote: But I also want that module to export strict and warnings. http://search.cpan.org/perldoc?Modern%3A%3APerl -- Ruud -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http

Re: Importing subs + strict and warnings using Exporter

2014-03-30 Thread Octavian Rasnita
From: Dr.Ruud rvtol+use...@isolution.nl On 2014-03-30 12:26, Octavian Rasnita wrote: But I also want that module to export strict and warnings. http://search.cpan.org/perldoc?Modern%3A%3APerl -- Ruud Thanks. I know about it but it is not helpful. I want to use in my scripts just: use

Re: Importing subs + strict and warnings using Exporter

2014-03-30 Thread Ruud H.G. van Tol
On 2014-03-30 19:10, Octavian Rasnita wrote: From: Dr.Ruud rvtol+use...@isolution.nl On 2014-03-30 12:26, Octavian Rasnita wrote: But I also want that module to export strict and warnings. http://search.cpan.org/perldoc?Modern%3A%3APerl Thanks. I know about it but it is not helpful

Re: Perl error codes and warnings

2013-05-29 Thread *Shaji Kalidasan*
in Perl) and I am in the process of preparing a document with suitable code snippets which includes the most common Perl programming errors and warnings. Your valuable input is highly appreciated and I cherish the treasure which I learned from you.   best, Shaji

RE: Perl error codes and warnings

2013-05-29 Thread Warren James - jawarr
Shaji - Upon completion, is this something which you could please consider providing to us/the list audience as well?: ...a document with suitable code snippets which includes the most common Perl programming errors and warnings. THANKS JJW From: *Shaji Kalidasan* [mailto:shajiin...@yahoo.com

Re: Perl error codes and warnings

2013-05-29 Thread *Shaji Kalidasan*
: RE: Perl error codes and warnings Shaji - Upon completion, is this something which you could please consider providing to us/the list audience as well?: “…a document with suitable code snippets which includes the most common Perl programming errors and warnings.”   THANKS JJW   From:*Shaji

Perl error codes and warnings

2013-05-28 Thread *Shaji Kalidasan*
Greetings, Where can I get more information on Perl's most common error codes? Is there a single source (repository/resource) for such most frequently encountered error codes? [code-1] use strict; use warnings; my @names = qw/bat, ball, %!*, king, (^@), eagle, zebra/; foreach (@names

Re: Perl error codes and warnings

2013-05-28 Thread Charles DeRykus
On 5/28/2013 8:19 PM, *Shaji Kalidasan* wrote: Greetings, Where can I get more information on Perl's most common error codes? Is there a single source (repository/resource) for such most frequently encountered error codes? [code-1] use strict; use warnings; [ ... ] The warnings

Re: Perl error codes and warnings

2013-05-28 Thread timothy adigun
; use warnings; my @names = qw/bat, ball, %!*, king, (^@), eagle, zebra/; with qw, you don't use a 'comma' to separate the element of the array. Because, the element are separated by space. So, the correct thing to do is: my @names = qw/bat ball %!* king (^@) eagle zebra/; foreach (@names

How to install non-most recent versions of the module warnings

2013-05-09 Thread Dariusz Dolecki
I am getting an error while running cpaninstall warnings, I have the latest stable release of perl. cpan[1] install warnings Reading '/root/.cpan/Metadata' Database was generated on Wed, 08 May 2013 07:17:03 GMT Running install for module 'warnings' The most recent version 1.14 of the module

Re: How to install non-most recent versions of the module warnings

2013-05-09 Thread David Precious
On Thu, 9 May 2013 14:13:27 -0500 Dariusz Dolecki dariusz.dole...@gmail.com wrote: I am getting an error while running cpaninstall warnings, I have the latest stable release of perl. 'warnings' isn't a CPAN module, it's a pragma, part of the core Perl distribution, you should not need

Re: How to install non-most recent versions of the module warnings

2013-05-09 Thread timothy adigun
Hi Dariusz, On Thu, May 9, 2013 at 8:13 PM, Dariusz Dolecki dariusz.dole...@gmail.comwrote: I am getting an error while running cpaninstall warnings, I have the latest stable release of perl. You don't have to install warnings is already installed for you, when perl was installed. cpan[1

no warnings inside a loop

2013-04-03 Thread Angela Barone
I'm just curious about this. If you put no warnings inside a loop, is it good only for that loop, or will it be in effect until the end of the script? Thanks, Angela A2 Hosting now has Perl 5.10.1 http://www.a2hosting.com/1250.html -- To unsubscribe, e-mail: beginners-unsubscr

Re: no warnings inside a loop

2013-04-03 Thread Brian Fraser
On Wed, Apr 3, 2013 at 8:29 PM, Angela Barone ang...@italian-getaways.comwrote: I'm just curious about this. If you put no warnings inside a loop, is it good only for that loop, or will it be in effect until the end of the script? Only for the loop -- warnings, along with most other

Re: no warnings inside a loop

2013-04-03 Thread Jim Gibson
On Apr 3, 2013, at 4:29 PM, Angela Barone wrote: I'm just curious about this. If you put no warnings inside a loop, is it good only for that loop, or will it be in effect until the end of the script? 'no warnings' is lexically scoped, meaning that its effect is limited to its

Re: no warnings inside a loop

2013-04-03 Thread Charles DeRykus
On Wed, Apr 3, 2013 at 4:29 PM, Angela Barone ang...@italian-getaways.comwrote: I'm just curious about this. If you put no warnings inside a loop, is it good only for that loop, or will it be in effect until the end of the script? See: perldoc perllexwarn From above doc

Re: no warnings inside a loop

2013-04-03 Thread Rob Dixon
On 04/04/2013 00:29, Angela Barone wrote: I'm just curious about this. If you put no warnings inside a loop, is it good only for that loop, or will it be in effect until the end of the script? Hi Angela The `warnings` pragma is *lexically* scoped. That means it applies to the (rest

Re: no warnings inside a loop

2013-04-03 Thread Rob Dixon
On 04/04/2013 00:29, Angela Barone wrote: I'm just curious about this. If you put no warnings inside a loop, is it good only for that loop, or will it be in effect until the end of the script? Also see `perllexwarn` Rob -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org

variable definition error not caught when using strict and warnings

2012-11-09 Thread Nemana, Satya
Hi I am a little confused with this program Program: use strict; use warnings; if ($999 == 1056) { print (\nequal); } else { print (\nnot equal); } What I expect: Perl to throw me an error as $999 variable is not defined, but perl executes the code with a warning.(I don't expect

Re: variable definition error not caught when using strict and warnings

2012-11-09 Thread Robert Wohlfarth
On Fri, Nov 9, 2012 at 11:08 AM, Nemana, Satya snem...@sonusnet.com wrote: Program: use strict; use warnings; if ($999 == 1056) { print (\nequal); } else { print (\nnot equal); } What I expect: Perl to throw me an error as $999 variable is not defined, but perl executes

Re: variable definition error not caught when using strict and warnings

2012-11-09 Thread Andy Bach
of capture parens - try: use strict; use warnings; 1056 =~ /(\d+)/; if ($1 == 1056) { print (equal\n); } else { print (not equal\n); } -- a Andy Bach, afb...@gmail.com 608 658-1890 cell 608 261-5738 wk

Re: variable definition error not caught when using strict and warnings

2012-11-09 Thread Rob Dixon
On 09/11/2012 17:08, Nemana, Satya wrote: Hi I am a little confused with this program Program: use strict; use warnings; if ($999 == 1056) { print (\nequal); } else { print (\nnot equal); } What I expect: Perl to throw me an error as $999 variable is not defined, but perl executes

RE: variable definition error not caught when using strict and warnings

2012-11-09 Thread Nemana, Satya
From: Rob Dixon [rob.di...@gmx.com] Sent: 09 November 2012 17:17 To: beginners@perl.org Cc: Nemana, Satya Subject: Re: variable definition error not caught when using strict and warnings On 09/11/2012 17:08, Nemana, Satya wrote: Hi I am a little

Re: Use of uninitialized value warnings

2011-06-06 Thread Chris Nehren
On Wed, Jun 01, 2011 at 12:00:36 -0400 , Uri Guttman wrote: also the use of // for defined or is relatively recent in perl. be careful when using it as it may not work in the version you have installed or in production. Relatively recent meaning 3.5 years old, and released in a version of perl

Re: Use of uninitialized value warnings

2011-06-06 Thread Uri Guttman
CN == Chris Nehren c.nehren/beginn...@shadowcat.co.uk writes: CN On Wed, Jun 01, 2011 at 12:00:36 -0400 , Uri Guttman wrote: also the use of // for defined or is relatively recent in perl. be careful when using it as it may not work in the version you have installed or in production.

Re: Use of uninitialized value warnings

2011-06-01 Thread am0c am0c
If you use $log = $log || ''; instead of $log = defined $log ? $log : ''; It might yield a problem because when $log is 0 it is defined but false in boolean context. The correct shorter version is: $log = $log // ''; And in the line 696: 696 my ($log, $pass) = $main::global-{login} ?

Re: Use of uninitialized value warnings

2011-06-01 Thread Uri Guttman
aa == am0c am0c a...@perl.kr writes: aa If you use aa $log = $log || ''; that should be $log ||= '' ; aa instead of aa $log = defined $log ? $log : ''; aa It might yield a problem because when $log is 0 it is defined but aa false in boolean context. aa The correct shorter

Use of uninitialized value warnings

2011-05-31 Thread sono-io
$main::global-{form}-{'ud'} = %%$main::global-{uid}%%$log%%$pass%%.time(); 698 $main::global-{form}-{'ud'} = Encrypt($main::global-{form}-{'ud'}, $main::global-{config}-{'cookie'}); 699 } These warnings are showing up in the log: • Use of uninitialized value $log

Re: Use of uninitialized value warnings

2011-05-31 Thread Jim Gibson
} ? ($main::global-{form}-{'userlogin'}, $main::global-{form}-{'userpass'}) : (); 697 $main::global-{form}-{'ud'} = %%$main::global-{uid}%%$log%%$pass%%.time(); 698 $main::global-{form}-{'ud'} = Encrypt($main::global-{form}-{'ud'}, $main::global-{config}-{'cookie'}); 699 } These warnings

Re: Use of uninitialized value warnings

2011-05-31 Thread sono-io
undefined. =:\ After I defined them as you mentioned, the warnings went away. Thanks again, Marc -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Warnings

2009-03-09 Thread Gunnar Hjalmarsson
Jerald Sheets wrote: On Mar 8, 2009, at 1:29 PM, Ron Bergin wrote: On Mar 4, 4:46 am, que...@gmail.com (Jerald Sheets) wrote: #!/usr/bin/perl -w It's better to use the warnings pragma, instead of the -w switch snip ... on the -w switch, here are Damian's words: quote 18.8. Warnings

Re: Difference between perl -w and use warnings in perl !

2008-09-02 Thread Dr.Ruud
Amit Saxena schreef: What's the difference between perl -w and use warnings in perl ? The -w is the old fashioned way, but still fine for one liners. If there is no difference, There is an important difference, see warnings and perllexwarn. then the use warnings can be removed from

Difference between perl -w and use warnings in perl !

2008-09-01 Thread Amit Saxena
Hi all, What's the difference between perl -w and use warnings in perl ? If there is no difference, then the use warnings can be removed from the perl programs and replace them with perl -w.of removing use warnings. Thanks Regards, Amit Saxena

Re: Difference between perl -w and use warnings in perl !

2008-09-01 Thread John W. Krahn
Amit Saxena wrote: Hi all, Hello, What's the difference between perl -w and use warnings in perl ? perldoc perllexwarn perldoc warnings John -- Perl isn't a toolbox, but a small machine shop where you can special-order certain sorts of tools at low cost and in short order

Re: Difference between perl -w and use warnings in perl !

2008-09-01 Thread Rob Dixon
Amit Saxena wrote: What's the difference between perl -w and use warnings in perl ? If there is no difference, then the use warnings can be removed from the perl programs and replace them with perl -w.of removing use warnings. The difference is that the pragma is lexically scoped

Re: Difference between perl -w and use warnings in perl !

2008-09-01 Thread Amit Saxena
On Mon, Sep 1, 2008 at 6:39 PM, Rob Dixon [EMAIL PROTECTED] wrote: Amit Saxena wrote: What's the difference between perl -w and use warnings in perl ? If there is no difference, then the use warnings can be removed from the perl programs and replace them with perl -w.of removing use

Re: Difference between perl -w and use warnings in perl !

2008-09-01 Thread Rob Dixon
Amit Saxena wrote: It's a requirement from the client side, according to them as only good code gets submitted from development environment to the production environment, they don't need use warnings and also perl -w as well. It might sound strange to you, (I also got surprised when I

perl warnings

2008-03-17 Thread Kashif Salman
) {...} the elsif runs if I hit a button on a form which has a hidden field that sets action=submit. My question is that the script produces a warning on the if statement Use of uninitialized value in string eq . How can I get rid of that without using no warnings. I tried 'if (defined($action

Re: perl warnings

2008-03-17 Thread yitzle
I think you want: if( defined $q-param('action') ) { } else { } -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: perl warnings

2008-03-17 Thread Gunnar Hjalmarsson
($action eq submit) {...} the elsif runs if I hit a button on a form which has a hidden field that sets action=submit. My question is that the script produces a warning on the if statement Use of uninitialized value in string eq . How can I get rid of that without using no warnings. I tried

Re: perl warnings

2008-03-17 Thread Kashif Salman
Use of uninitialized value in string eq . How can I get rid of that without using no warnings. I tried 'if (defined($action))' but that still produces a warning. if ( ! $action ) {...} -- if( defined $q-param('action') )#still produces the warning if ( ! $action

Re: perl warnings

2008-03-17 Thread John W. Krahn
eq ) {...} elsif ($action eq submit) {...} the elsif runs if I hit a button on a form which has a hidden field that sets action=submit. My question is that the script produces a warning on the if statement Use of uninitialized value in string eq . $ perl -le' use warnings; use strict; my $action

Re: perl warnings

2008-03-17 Thread Paul Lalli
rid of that without using no warnings. I tried 'if (defined($action))' but that still produces a warning. perldoc -q quoting Stop double quoting your variables. The warning is telling you that you're using an uninitialized value in a string. That warning is important and relevant. It's

Re: perl warnings

2008-03-17 Thread Paul Lalli
value in string eq . How can I get rid of that without using no warnings. I tried 'if (defined($action))' but that still produces a warning.      if ( ! $action ) {...} That'll work great until some jackass puts ?action=0 in the URL. Using defined() is correct. It's what he's passing to defined

Re: perl warnings

2008-03-17 Thread Kashif Salman
question is that the script produces a warning on the if statement Use of uninitialized value in string eq . How can I get rid of that without using no warnings. I tried 'if (defined($action))' but that still produces a warning. if ( ! $action ) {...} That'll work great

Re: perl warnings

2008-03-17 Thread Gunnar Hjalmarsson
Paul Lalli wrote: On Mar 17, 2:46 pm, [EMAIL PROTECTED] (Gunnar Hjalmarsson) wrote: if ( ! $action ) {...} That'll work great until some jackass puts ?action=0 in the URL. So what? If you put random crap in the URL, you can't reasonably expect a meaningful response. In this case,

Re: perl warnings

2008-03-17 Thread Justin Hawkins
On 17 Mar 2008, at 21:58, Gunnar Hjalmarsson wrote: In this case, if I understand it correctly, the default version of the page, with a form, would appear. Why would that be a problem for anybody but the stupid user? ;-) Fundamentally, don't make it possible for your users to do anything

Getopt::Std and warnings

2007-12-14 Thread reader
Doesn't give any warnings. The code passed: `$optstr =abc:' does indicate there should be an accompanying argument with opt_c The code is kind of silly but in addition to seeing what would happen when -c was not given an argument... I was also checking what happened to any argument

Re: Getopt::Std and warnings

2007-12-14 Thread John W . Krahn
On Friday 14 December 2007 09:09, [EMAIL PROTECTED] wrote: I want a warning message without having to do special coding with Getopt::Std. Getopt is one of those itches that a lot of people have felt like scratching: http://search.cpan.org/search?query=getoptmode=module If Getopt::Std or

Re: Getopt::Std and warnings

2007-12-14 Thread reader
. Says it has quite a few ways to make it output errors or warnings.. The only drawback, just from reading the synopsis, appears to be that few of the letters are spoken for, depending on what Getopt::Easy you set. But with 46 or so others ... I think I might be able to work around that limitation

Re: Pragmas use strict and use warnings

2007-10-31 Thread [EMAIL PROTECTED]
On Oct 30, 9:24 pm, [EMAIL PROTECTED] (Jenda Krynicky) wrote: On 30 Oct 2007 at 10:22, Paul Lalli wrote: On Oct 30, 11:15 am, [EMAIL PROTECTED] (Chas. Owens) wrote: On 10/30/07, Kaushal Shriyan [EMAIL PROTECTED] wrote: snip Whats the exact purpose of use strict snip The strict

Re: Pragmas use strict and use warnings

2007-10-31 Thread Paul Lalli
On Oct 30, 2:23 pm, [EMAIL PROTECTED] (Kevin Viel) wrote: -Original Message- From: Paul Lalli [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 30, 2007 12:23 PM To: [EMAIL PROTECTED] Subject: Re: Pragmas use strict and use warnings ...no lexical with that name

Re: Pragmas use strict and use warnings

2007-10-31 Thread Paul Lalli
On Oct 30, 5:24 pm, [EMAIL PROTECTED] (Jenda Krynicky) wrote: On 30 Oct 2007 at 10:22, Paul Lalli wrote: On Oct 30, 11:15 am, [EMAIL PROTECTED] (Chas. Owens) wrote: On 10/30/07, Kaushal Shriyan [EMAIL PROTECTED] wrote: snip Whats the exact purpose of use strict snip The

Re: Pragmas use strict and use warnings

2007-10-31 Thread Jenda Krynicky
On 31 Oct 2007 at 4:17, Paul Lalli wrote: On Oct 30, 5:24 pm, [EMAIL PROTECTED] (Jenda Krynicky) wrote: On 30 Oct 2007 at 10:22, Paul Lalli wrote: On Oct 30, 11:15 am, [EMAIL PROTECTED] (Chas. Owens) wrote: On 10/30/07, Kaushal Shriyan [EMAIL PROTECTED] wrote: snip Whats the exact

Pragmas use strict and use warnings

2007-10-30 Thread Kaushal Shriyan
Hi Whats the exact purpose of use strict and use warnings Pragmas in the Perl Programming Language. I know use warnings turns on all useful warnings. Thanks and Regards Kaushal

Re: Pragmas use strict and use warnings

2007-10-30 Thread Chas. Owens
On 10/30/07, Kaushal Shriyan [EMAIL PROTECTED] wrote: snip Whats the exact purpose of use strict snip The strict pragma has three effects (unless modified by arguments): 1. most variables must be declared (there are some exceptions) 2. only real references are allowed (symbolic references are

Re: Pragmas use strict and use warnings

2007-10-30 Thread Paul Lalli
On Oct 30, 11:15 am, [EMAIL PROTECTED] (Chas. Owens) wrote: On 10/30/07, Kaushal Shriyan [EMAIL PROTECTED] wrote: snip Whats the exact purpose of use strict snip The strict pragma has three effects (unless modified by arguments): 1. most variables must be declared (there are some

Re: Pragmas use strict and use warnings

2007-10-30 Thread Jenda Krynicky
On 30 Oct 2007 at 10:22, Paul Lalli wrote: On Oct 30, 11:15 am, [EMAIL PROTECTED] (Chas. Owens) wrote: On 10/30/07, Kaushal Shriyan [EMAIL PROTECTED] wrote: snip Whats the exact purpose of use strict snip The strict pragma has three effects (unless modified by arguments): 1. most

RE: Pragmas use strict and use warnings

2007-10-30 Thread Kevin Viel
-Original Message- From: Paul Lalli [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 30, 2007 12:23 PM To: beginners@perl.org Subject: Re: Pragmas use strict and use warnings ...no lexical with that name... ^^^ ...to declare a lexical of that name

  1   2   3   >