how to warn?

From: Jason L. Woodruff (damnspamhasalreadygotme_at_spam.net)
Date: 09/09/04


Date: Thu, 09 Sep 2004 03:20:13 -0500

Hell guys:

I'm going to say it....I'm a newbie to PERL (sorta) and I'm working
around with a script that opens a database (user.db) and
adds/removes/and updates data in the database. The script will delete a
entry in the the database file but i would like to warn the user before
the actual delete is done.

Here is some code I'm looking at:

if ($input{'action'} eq 'delete'){
open (DATABASE,">$database");
@DB=<DATABASE>;
                foreach $rec (@ODB){
                                chomp..................so on...............

I was wondering, if I slip the "{else}" "statement" in between this:

if ($input{'action'} eq 'delete'){
*the warning - user interaction - $Yes = proceed or $No = cancel *
{else}
*$Yes = go ahead and delete*

I would like to use some kind of "event handler", but If anyone has any
suggestions or experience, I would appreciate your help.

TIA
-JLW

-- 
Registered Linux user #339721
Visit me @ http://jlwoodruff.mystarband.net


Relevant Pages