Help for this page

Select Code to Download


  1. or download this
    \$foo == *foo{SCALAR}
    \@foo == *foo{ARRAY}
    ...
    \&foo == *foo{CODE}
    \*foo == *foo{GLOB}
             *foo{IO}
    
  2. or download this
    *foo = \"Scalar"  # Note: constants are read-only
    *foo = [ 'Array' ]
    ...
    *foo = sub { print 'Subroutine' }
    *foo = Symbol::gensym  # GLOB
    *foo = Symbol::geniosym  # IO
    
  3. or download this
    sub method { print "\@_ is: @_\n" }
    *foo = bless [ 'Array' ], 'main';
    *foo{ARRAY}->method("It's an object now");
    
  4. or download this
    sub method { print "\@_ is: @_\n" }
    *foo = bless [ 'Array' ], 'main';
    (\@foo)->method("It's an object now");
    
  5. or download this
    use IO::Handle;
    STDOUT->autoflush(1);
    
  6. or download this
    use IO::Handle;
    use CGI;
    open CGI, 'somefile' or die $!;
    my $cgi = CGI->new;