my $change_next; while (<>) { if ( /cn=xyzzzwelcome1## perl name_of_script < old_file.xml > new_file.xml