Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: one user prompt instead of many

by bibliophile (Parson)
on Jan 26, 2005 at 17:43 UTC ( #425311=note: print w/ replies, xml ) Need Help??


in reply to one user prompt instead of many

Maybe move the question outside the loop?

print "Delete files older than 3 days? [Y or N] \n"; chomp ($cleanup = <STDIN>); if ($cleanup =~ /Y/i) { foreach my $file (@bigarray) { ... } }

Untested!

Update:
Wow, you guys are *fast*! Two responses as I was typing my (meagre) thought....


Comment on Re: one user prompt instead of many
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (16)
As of 2015-07-02 19:36 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 (45 votes), past polls