in reply to Required help on substitution using a string in perl

You can make use of the fact that the dot doesn't match a newline character by default (unless the /s modifier is present):
$abs =~ s/.*\Q$input_var\E.*\n?//;

For more information please consult perlretut and perlre.