>>>>> "SHC" == Shawn H Corey <shawnhco...@gmail.com> 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  ------  u...@stemsystems.com  --------  http://www.sysarch.com --
-----  Perl Code Review , Architecture, Development, Training, Support ------
---------  Gourmet Hot Cocoa Mix  ----  http://bestfriendscocoa.com ---------

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to