Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
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 about the Monastery: (5)
As of 2015-07-07 05:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (87 votes), past polls