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....


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 studying the Monastery: (18)
As of 2014-09-18 14:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (116 votes), past polls