Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
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....

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 examining the Monastery: (7)
As of 2016-06-25 20:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (327 votes). Check out past polls.