$x = input_line(); # input_line returns undef on failure $y = input_line(); if ( $x eq $y ) { # checks to see if both lines are equal }