in reply to Re: Re: Regarding B::Deparse
in thread Regarding B::Deparse
Below, the second regex is the result of running the first one through B::Deparse. As this example shows, they are not the same.
#!/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 touch +ed by /x # equivalent to the non-x: s/c\nd//; print "V1 = '$v1'\n"; print "V2 = '$v2'\n"; =OUTPUT V1 = 'abef' V2 = 'abcdef'
-Blake
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re(x4): Regarding B::Deparse
by robin (Chaplain) on Dec 19, 2001 at 18:37 UTC |