Help for this page

Select Code to Download


  1. or download this
    my($foo, $bar, $baz, $quux) = split /\s+/, $str;
    
  2. or download this
    # Change this line if the number of entries changes.
    use constant ENTRIES_PER_LINE => 4;
    ...
      my($foo, $bar, $baz, $quux) = @entries;
      # continue with your code
    }
    
  3. or download this
    ...
    my %template_value_for;
    my @fields = qw(foo bar baz quux);
    @template_value_for{@fields} = @entries;