my $q='qqqweqwe asdasdasd zxczxczxc tyutyutyi '; my $a='zxczxczxc'; #### $q=~s#[.\n]*$a##;