Using Active Perl : how to load file and read every line?

open(i,"<url.txt");
while(<i>)
{
chomp;
print $_,"\n";
}
close(i);
----------------------------
The "chomp" command removes any carriage returns and/or linefeeds. The "$_" variable will contain the line of text. The "while" loop will terminate when there is no more input.
 
Back
Top