Read a file line by line: Difference between revisions

Content added Content deleted
No edit summary
No edit summary
Line 609: Line 609:
chomp;
chomp;
process($_);
process($_);
}</lang>

=={{header|Perl 6}}==
<lang Perl 6>my @filelines = lines 'testfile.txt' ;
for @filelines -> $line {
$line.say ;
}</lang>
}</lang>