# The while loop reads each line of the file, one at a time. You can # then process each line individually. while( ) { chomp( $_ ); # This removes the newline from each line. # Add code to process each URL. } #### open( INFO, $file ); # This will only read the file up to the first newline. If the lines # in the file are delimited with newlines, it will read the first # line in the file and stop. my $line = ; close( INFO ); chomp ( $line ); # Add code to process the first URL. #### # Removes newlines from each array element at once. chomp( @lines );