while (my $in = <$fhin>) { # ... split etc. done once for each line $in. }