Leser: 1
![]() |
![]() |
5 Einträge, 1 Seite |
QuoteAlthough the deepest nested array or hash will not spring into existence just because its existence was tested, any intervening ones will. Thus $ref->{"A"} and $ref->{"A"}->{"B"} will spring into existence due to the existence test for the $key element above. This happens anywhere the arrow operator is used (...)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/perl
use strict;
use warnings;
use Data::Dumper;
my %one = ( color => "red" );
my $two = { color => "blue" };
print "Bogus\n" if exists $one{shape}{box};
print "Bogus\n" if exists $two->{shape}->{box};
print Dumper \%one, Dumper $two;
![]() |
![]() |
5 Einträge, 1 Seite |