Given the following:
my $pages;
push (@{$pages}, { 'name' => 'Home', 'url' => '/' });
push (@{$pages}, { 'name' => 'About', 'url' => '/html/about.html' });
push (@{$pages}, { 'name' => 'Location', 'url' => '/html/loc.html' });
Is there a clean (simple) way of adding an additional hash element (i.e. 'flag' => 1) to the array where "url" eq "/html/about.html" without having to itterate though the entire data structure? I've done it with nested foreach/while loops but I imagine this can be done much nicer with map, but I haven't had any success.
Thanks!