Re: unit messages
- From: tom@xxxxxxxxxxxxxx (Tom Phoenix)
- Date: Mon, 30 Apr 2007 11:12:57 -0700
On 4/30/07, oryann9 <oryann9@xxxxxxxxx> wrote:
Use of uninitialized value in concatenation (.) or
string at
JFS_version_parser.pl line 20, <JFS> line 952 (#1)
This message happens because some value was undef instead of a string.
From the message, it seems likely that it's a variable beinginterpolated into a string. Once you find out which variable, and why
it's undef, and that it doesn't matter whether it's undef or an empty
string, you could fix it something like this:
# avoid messages about uninitialized $whatever
$whatever = "" unless defined $whatever;
use strict;
use warnings;
use diagnostics;
The first two are great. The third one is not intended for production
code; you should 'use diagnostics' only when you're developing code
and expecting error messages. I say this in part because 'diagnostics'
has a significant overhead of both time and memory. Be sure to disable
it when your code goes into production.
You have mail.
Don't we all?
Cheers!
--Tom Phoenix
Stonehenge Perl Training
.
- References:
- unit messages
- From: Oryann9
- unit messages
- Prev by Date: Re: MAC and install CPAN
- Next by Date: Re: Extract part of a string
- Previous by thread: unit messages
- Next by thread: Re: unit messages
- Index(es):
Relevant Pages
|