open(INPUT, "filename.txt"); while() { # whatever's in here will be executed for every line - i'm assuming that's what "one by one" means } close(INPUT);