in reply to While but not for clobbers $_
You can always localise $_ in your while loops yourself
for (1..3) { while(local $_=<STDIN>) { print; #Prints whatever was typed } print; # print 1, 2, 3 }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: While but not for clobbers $_
by Nkuvu (Priest) on Apr 15, 2003 at 06:59 UTC | |
by BrowserUk (Patriarch) on Apr 15, 2003 at 11:16 UTC |