in reply to 'while', 'foreach' not in perlfunc
while doesn't do any binding except when calling readline or glob (either by name or by using the <...> syntax):
while (<STDIN>) { ... } while (readline(STDIN)) { ...} are equivalent to: while (1) { last unless defined($_ = <STDIN>); ... +} while (glob("*.c")) { ... } while (<*.c>) { ... } are equivalent to: my @list = glob("*.c"); for (@list) { ... };
|
|---|