Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
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 contemplating the Monastery: (14)
As of 2014-10-24 14:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (132 votes), past polls