#!/usr/bin/perl -wT use strict; my $v1 = my $v2 = "abcdef"; $v1 =~ s/c d//x; # original pattern: literal \n is gobbled by /x # equivalent to the non-x: s/cd//; $v2 =~ s/c\nd//x; # deparsed version: interpolated "\n" is not touched by /x # equivalent to the non-x: s/c\nd//; print "V1 = '$v1'\n"; print "V2 = '$v2'\n"; =OUTPUT V1 = 'abef' V2 = 'abcdef'