http://www.perlmonks.org?node_id=1019037


in reply to Re: Deletes All Records not just one
in thread Deletes All Records not just one

Thanks for all of the information and the revised code worked it did delete the entries in the file and when i opened the data.txt file here was the input:


delcarEntry=HASH(0x191920c)
delcarEntry=HASH(0x191920c)
delcarEntry=HASH(0x191920c)

Replies are listed 'Best First'.
Re^3: Deletes All Records not just one
by tobyink (Canon) on Feb 16, 2013 at 13:42 UTC

    Try:

    print $out_file_handle $line_from_file, "\n";

    You're currently printing out the variable $_ which isn't being defined by any of the code you posted (but is being defined somewhere else to point to an object of some kind).

    package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name