#!/usr/bin/perl
package Foo;
@n      = 1 .. 5;
$string = "Hello Perl!\n";
%dict   = ( 1 => 'one' );
sub add { $_[0] + $_[1] }
foreach my $entry ( keys %Foo:: ) {
    print "-" x 8, " Name: [$entry]\t";
    print "scalar is defined\n" if defined ${$entry};
    print "array  is defined\n" if defined @{$entry};
    print "hash   is defined\n" if defined %{$entry};
    print "sub    is defined\n" if defined &{$entry};
}
