print "Input a string :"; $_ = ; chomp($_); if (/^"([^"\\]|\\"|\\\\)*"$/){ print "valid comment\n"; }