Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
my @rules = (
"optional:ketchup",
"requires:mustard",
"requires:onion",
"optional:salt",
"requires:bread",
"optional:pepper" );
foreach( @rules ) {
( $rule, $value ) = split /:/;
push @{ $hotdog{$rule} }, $value;
}
foreach $rule ( sort keys %hotdog ) {
print "$rule -> @{ $hotdog{$rule} }\n";
}
optional -> ketchup salt pepper
requires -> mustard onion bread
my @sample_data = (
"boys:ted:bill:fred",
"girls:jane:amy",
"cats:tom:tigger",
"dogs:spot:buster",
);
foreach( @sample_data ) {
my( $key, @values ) = split /:/;
$names{ $key } = \@values;
}
foreach( sort keys %names ) {
local $" = ' and ';
print "$_ => [ @{ $names{$_} } ]\n";
}
boys => [ ted and bill and fred ]
cats => [ tom and tigger ]
dogs => [ spot and buster ]
girls => [ jane and amy ]
$hash{'firstname'} = "Tracy";
$hash{'lastname'} = "Dryden";