RE: Use of uninitialized value
- From: cclarkson@xxxxxxxxxx (Charles K. Clarkson)
- Date: Sat, 10 Sep 2005 00:39:35 -0500
Beast <mailto:beast@xxxxxxx> 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 does not return a value?
One option is to supply a default value:
my $value = get_value_from_external_program || 'default';
Or:
my $value = get_value_from_external_program || '';
HTH,
Charles K. Clarkson
--
Mobile Homes Specialist
254 968-8328
.
- Follow-Ups:
- RE: Use of uninitialized value
- From: DBSMITH
- Re: Use of uninitialized value
- From: Beast
- RE: Use of uninitialized value
- References:
- Use of uninitialized value
- From: Beast
- Use of uninitialized value
- Prev by Date: RE: Use of uninitialized value
- Next by Date: Re: Use of uninitialized value
- Previous by thread: Use of uninitialized value
- Next by thread: Re: Use of uninitialized value
- Index(es):
Relevant Pages
|