ForNext
Only Do What Only You Can Do
179. iterate over file by line
Hyperpolyglot Interpreted Languages: PHP, Perl, Python, Ruby より (2012.05.08)
VBScript
JScript
Perl
while ($line = <$f>) {
PHP
while (!feof($f)) { $line = fgets($f);
Python
for line in f:
Ruby
f.each do |line|