Does anyone know how to ignore the rest of a line in Perl? I am reading a file and printing out tokens to an output file. I want to ignore the rest of a line after a colon is found, which indicates a comment. That way it will not print to the output file. I tried a range from (; - \n) but it does not work. Thanks for any input.