"be consistent" | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Hello Perl Monks: I am using a Perl CGI script to display/edit a file that has data lines like:
I match each data line against: /^(\d\d\d\d)\s+("[^"]+")\s+(\S+)$/and save in a hash whose key is the 1st field and whose value is a reference to an anonymous array of the 2nd & 3rd fields, ex: $bkarr{$1} = [ $2 , $3 ];Should the user choose to delete a line I just delete the hash entry that he specifies via: delete $kbarr{$K};before writing out the file. It works, but am I creating a memory leak by doing this? Do I have to somehow clean up the two-entry array whose reference I am holding in the hash entry? Thanks for any advice. In reply to Possible Memory Leak? by Clovis_Sangrail
|
|