Help for this page

Select Code to Download


  1. or download this
    my $var; # Declares a single variable.
    
  2. or download this
    my $var = "Hello world!\n";
    my $var = 10;
    ...
    my $var = \%some_hash;
    my $var = \$some_scalar;
    my $var = \&some_function;
    
  3. or download this
    my ( $this, $that );
    
  4. or download this
    my ( $this, $that ) = ( "the", "other" );
    
  5. or download this
    my ($var);
    
  6. or download this
    my ($var) = "This";
    
  7. or download this
    my ( $this, $that ) = "The other";
    
  8. or download this
    my @array = ("This", "That", "and", "The", "Other");
    my %hash = ( "This" => "That",
    ...
                      # constructer is distributive and
                      # applies to both items inside the rvalue
                      # list.