#!/usr/bin/env perl use strict; use warnings; use Test::More tests => 2; my $q = 'qqqweqwe asdasdasd zxczxczxc tyutyutyi '; my $a = 'zxczxczxc'; my $want = "\ntyutyutyi\n"; my $t = $q; $t =~ s/^.*$a//sm; is ($t, $want, "With /s - matched"); $t = $q; $t =~ s/^.*$a//m; isnt ($t, $want, "No /s - not matched");