You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

10 lines
344 B
Perl

#Format: exists $ASSOC_ARRAY{KEY}
#!/usr/bin/perl
%employees=("Tester" => "Joe",
"Coder" => "Teddy",
"Clerk" => "Tom",
);
print "exists.\n" if exists $employees{"Tester"};
print "The Clerk exists.\n" if exists $employees{"Clerk"};
print "The Boss does not exist.\n" if not exists $employees{"Boss"};