Neinicializovane klice hashe
Honza Pazdziora
adelton na informatics.muni.cz
Úterý Duben 27 13:29:13 MEST 2004
On Tue, Apr 27, 2004 at 12:35:03PM +0200, Ondrej Koala Vacha wrote:
>
> Jejda, ted vypadam jako tulpas, ktery neumi exists:). Myslel jsem to jinak
Aha, ja myslel, ze jste si nedal rano caj a bloudite ;-)
> - nejaky modul nebo direktiva (ala use strict), ktera treba povoli
> $a{'a'} = 0, ale uz ne $x = $a{'x'}. Mam takovy dojem, ze to bylo udelane
> pres 'tie'.
package Foo;
use fields ( "a", "b" );
sub new { new fields shift }
package main;
my Foo $bar = new Foo;
$bar->{"a"} = 10;
print $bar->{"a"}, "\n";
print $bar->{"x"}, "\n";
__END__
--
------------------------------------------------------------------------
Honza Pazdziora | adelton na fi.muni.cz | http://www.fi.muni.cz/~adelton/
.project: Perl, mod_perl, DBI, Oracle, large Web systems, XML/XSL, ...
Only self-confident people can be simple.
Další informace o konferenci Perl