in reply to Pattern-matching hash keys
where I have simplified your regexp.$id = $1 if $key =~ /^(copy_\d_frag_\d_id)$/;
For the second question, this is a hash, so you add a key-value pair, rather than push onto an array:
$status{$client}{'tapes'}{$id} = 1;
Update: corrected a bug in the code.
-Mark
|
|---|