in reply to removing element from hash array

or:

#!/bin/perl5 use strict; use warnings; use Data::Dumper; my %h = ( 'list' => { 'find' => [ { 'type' => 'error', 'column' => '106', }, { 'type' => 'warning', 'column' => '1', } ] } ); delete $h{list}{find}[1]; die Dumper(\%h); __DATA__ ---------- Capture Output ---------- > "c:\perl\bin\perl.exe" _new.pl $VAR1 = { 'list' => { 'find' => [ { 'type' => 'error', 'column' => '106' } ] } }; > Terminated with exit code 255.

Replies are listed 'Best First'.
Re^2: removing element from hash array
by Errto (Vicar) on Nov 16, 2005 at 23:47 UTC
    Weird. All this time I thought delete only worked on hashes and you had to use splice for arrays, but I was obviously wrong.