S
Sandman
Using php, an array definition might look like this:
$foo = array(
"foo" => array("foo", "bar"),
"bar" => array("rab", "oof")
);
print $foo["foo"][0];
....would print "foo"
$foo = array(
"foo" => array("foo" => "orange", "bar" => "apple"),
"bar" => array("rab" => "pear", "oof" => "pineapple")
);
print $foo["foo"][0];
print $foo["foo"]["foo"];
....would both print "orange".
How would the syntax be in perl? Perl differantiates betwen hashes and arrays,
and in php an array is an hash and an array at the same time (i.e. every key in
the array exists as both named and as index).
$foo = array(
"foo" => array("foo", "bar"),
"bar" => array("rab", "oof")
);
print $foo["foo"][0];
....would print "foo"
$foo = array(
"foo" => array("foo" => "orange", "bar" => "apple"),
"bar" => array("rab" => "pear", "oof" => "pineapple")
);
print $foo["foo"][0];
print $foo["foo"]["foo"];
....would both print "orange".
How would the syntax be in perl? Perl differantiates betwen hashes and arrays,
and in php an array is an hash and an array at the same time (i.e. every key in
the array exists as both named and as index).