in reply to Re^2: Delete reference tree from a file
in thread Delete reference tree from a file

So, just delete that then.

use strict; use warnings; use Test::More tests => 2; my $ref = { 'servername.com' => 'foo' }; ok (defined $ref->{'servername.com'}, 'Present'); delete $ref->{'servername.com'}; ok (!defined $ref->{'servername.com'}, 'Absent');

Replies are listed 'Best First'.
Re^4: Delete reference tree from a file
by aravind.kalla (Novice) on Mar 27, 2018 at 14:05 UTC

    Thanks for the input... but here the status file contains the reference, and this has to be deleted from the file.

      The algorithm in full:

      1. Read the data from the file into a hashref.
      2. Delete the entries as desired.
      3. Write the hashref back to the file.