$/=undef; #sets the record separator to [undef] so it keeps reading #until there is nothing more to read open FILE, "; close FILE; $/="\n"; #set it back to \n so if you try to read from the #terminal it only takes a line at a time