PERL:


PERL: - . 150



154 5

Perl ­ (, spare craps ),

> ---------------------------------------------------------------------------------------------

List Value Constructorspeildata(\), 5 2

5.2.

, ­

exists

# % $"?
if (exists($X3UJ{$MK)4})) {

# } else {

}

exists , %food_color

# %food_color
foreach $name ( Banana Martini ) {

if (exists $food_color{$name}) {

print $name is a food \n } else {

print Sname is a drink \n

Banana is a food Martini is a drink

exists , , ­ , , ­

= Toddler } = 3


5.2. 堠 155

$age{ Unborn } = ${ Phantasm } = undef

foreach $thmg ( Toddler Unborn Phantasm Relic } { print Sthing

print Exists if exists $age{$thmg} print Defined if defined $age{thmg} print True if $age{$thing} print \n

Toddler Exists Defined True Unborn Exists Defined Phantasm Exists Relic

$age{ Toddler } , ­ , Toddle r , undef , , ­ Perl




- -  - -  - -