>>>>> "SHC" == Shawn H Corey <[email protected]> writes:
SHC> On 10-06-05 03:26 PM, Bryan Harris wrote:
>> [console]
>> $ perl -e 'use warnings; $c=undef; printf("%s", $c->[0]{dog})'
>> Use of uninitialized value in printf at -e line 1.
>> [/console]
>>
>> Anything that can help me here? I wish it'd say:
>>
>> Use of uninitialized value $c->[0]{dog} in printf at -e line 1.
>>
>> ... but it doesn't.
SHC> I wish it would say:
SHC> Not an ARRAY reference in printf at -e line 1.
that is not happening due to autovivification. whenever you use an undef
like it was a reference, perl will allocate that for you and replace the
undef. this is very useful, much more than the issues it causes.
uri
--
Uri Guttman ------ [email protected] -------- http://www.sysarch.com --
----- Perl Code Review , Architecture, Development, Training, Support ------
--------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com ---------
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/