- or download this
my($foo, $bar, $baz, $quux) = split /\s+/, $str;
- 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
}
- or download this
...
my %template_value_for;
my @fields = qw(foo bar baz quux);
@template_value_for{@fields} = @entries;