Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Deletes All Records not just one

by Plankton (Priest)
on Feb 16, 2013 at 06:26 UTC ( #1019014=note: print w/ replies, xml ) Need Help??


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.


Comment on Re: Deletes All Records not just one
Select or Download Code
Re^2: Deletes All Records not just one
by tobyink (Abbot) 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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1019014]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (10)
As of 2014-09-19 21:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (147 votes), past polls