Help for this page

Select Code to Download


  1. or download this
    # The while loop reads each line of the file, one at a time. You can
    # then process each line individually.
    ...
        chomp( $_ );     # This removes the newline from each line.
        # Add code to process each URL.
    }
    
  2. or download this
    open( INFO, $file );
    # This will only read the file up to the first newline. If the lines
    ...
    close( INFO );
    chomp ( $line );
    # Add code to process the first URL.
    
  3. or download this
    # Removes newlines from each array element at once.
    chomp( @lines );