Iterating Over Files Line By Line

Use open to get a file handle.
Use :r to indicate we want to read.
Iterate over the file's lines using for.
Close the file when you're done.
my $fh = open "file.txt" :r;
for =$fh -> $line {
    #do something with $line here
}
$fh.close();
Type :next to continue