in reply to match with exception

This depends on just how you define 'everything except sequence xyz'.

One way (note that a piece of 'xyz', the 'yz', is captured – after all, 'yz' is not 'xyz'!):

>perl -wMstrict -le "my $s = 'abcxyzdef'; my $exclude = qr{ xyz }xms; my $all_not_xyz = qr{ (?! $exclude) . }xms; my @matches = $s =~ m{ ($all_not_xyz+) }xmsg; print qq{@matches}; " abc yzdef
Another way (note that the 'xyz' sequence is entirely excluded):
>perl -wMstrict -le "my $s = 'abcxyzdef'; my $exclude = qr{ xyz }xms; my @matches = split m{ $exclude }xms, $s; print qq{@matches}; " abc def
These approaches generalize nicely to multiple exclusion sequences:
>perl -wMstrict -le "my $s = 'abcFOOdefBARghi'; my $exclude = qr{ FOO | BAR }xms; my $all_but = qr{ (?! $exclude) . }xms; my @matches = $s =~ m{ ($all_but+) }xmsg; print qq{@matches}; @matches = split m{ $exclude }xms, $s; print qq{@matches}; " abc OOdef ARghi abc def ghi