Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
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 making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2014-12-25 22:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (163 votes), past polls