Help for this page

Select Code to Download


  1. or download this
    sub test {
        my($pkg) = caller;
    ...
    
    __END__
    I've been called from package Foo
    
  2. or download this
    $Foo::x   # scalar
    @Foo::y   # array
    %Foo::z   # hash
    $Foo:z{bar}  # hash item
    # etc.
    
  3. or download this
    my $pkg = "Foo";
    my $var = "x";
    ...
    
    __END__
    prints: "123";