Help for this page

Select Code to Download


  1. or download this
    my $scalar = 'abc';
    
    print "$scalar\n";
    
  2. or download this
    my @array = ('abc', 123, 'dog');
    
    for (@array) {
      print "$_\n";
    }
    
  3. or download this
    my %hash = ( bob => 'dog',
                 sue => 'cat',
    ...
    for (keys(%hash)) {
      print "$_ has a $hash{$_}.\n";
    }