Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
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 wandering the Monastery: (4)
As of 2014-07-26 03:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (175 votes), past polls