while ( ) { if ( /^SOURCES/ && /\\$/ ) { $_ .= ; redo; } elsif ( /^SOURCES/ ) { print; } }