in reply to Deletes All Records not just one

Maybe you should do ...
print DAT "$_\n";
... instead of ...
print ("$_\n");
You might also might want to learn about yaml or sqlite. Dealing flatfile databases is just a pain, especially when there are better tools.

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

    A simple ++ is not enough. You have hit the nail on the head. His code currently prints to STDOUT instead of printing to the file.

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