/Q /E differences depending which Perl Version is used

/Q /E differences depending which Perl Version is used

am 08.12.2008 15:29:47 von Patrick Schiess

--===============0296235230==
Content-Language: de-DE
Content-Type: multipart/alternative;
boundary="_000_7900F427F393E046A34C5266BF3FDE3419FAD1E3ABvmv ito10vitod_"

--_000_7900F427F393E046A34C5266BF3FDE3419FAD1E3ABvmvito10vit od_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

hi,

can someone of you guys telling me why e.g. this command:

print ("%%Escalation%%bla.bla@domain.ch" =3D~ /\Q\%\%bla.bla@domain.c=
h\E$/i);

on a system with perl 5.10 does not give me back a matching, as the same ex=
pression gives me back a matching on a perl 5.8.8 system?

thanks.

kind regards,
patrick.

--_000_7900F427F393E046A34C5266BF3FDE3419FAD1E3ABvmvito10vit od_
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:x=3D"urn:schemas-microsoft-com:office:excel" xmlns:p=3D"urn:schemas-m=
icrosoft-com:office:powerpoint" xmlns:a=3D"urn:schemas-microsoft-com:office=
:access" xmlns:dt=3D"uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:s=3D"=
uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:rs=3D"urn:schemas-microsof=
t-com:rowset" xmlns:z=3D"#RowsetSchema" xmlns:b=3D"urn:schemas-microsoft-co=
m:office:publisher" xmlns:ss=3D"urn:schemas-microsoft-com:office:spreadshee=
t" xmlns:c=3D"urn:schemas-microsoft-com:office:component:spread sheet" xmlns=
:oa=3D"urn:schemas-microsoft-com:office:activation" xmlns:html=3D"http://ww=
w.w3.org/TR/REC-html40" xmlns:q=3D"http://schemas.xmlsoap.org/soap/envelope=
/" xmlns:D=3D"DAV:" xmlns:x2=3D"http://schemas.microsoft.com/office/excel/2=
003/xml" xmlns:ois=3D"http://schemas.microsoft.com/sharepoint/soap/oi s/" xm=
lns:dir=3D"http://schemas.microsoft.com/sharepoint/soap/dire ctory/" xmlns:d=
s=3D"http://www.w3.org/2000/09/xmldsig#" xmlns:dsp=3D"http://schemas.micros=
oft.com/sharepoint/dsp" xmlns:udc=3D"http://schemas.microsoft.com/data/udc"=
xmlns:xsd=3D"http://www.w3.org/2001/XMLSchema" xmlns:sub=3D"http://schemas=
..microsoft.com/sharepoint/soap/2002/1/alerts/" xmlns:ec=3D"http://www.w3.or=
g/2001/04/xmlenc#" xmlns:sp=3D"http://schemas.microsoft.com/sharepoint/" xm=
lns:sps=3D"http://schemas.microsoft.com/sharepoint/soap/" xmlns:xsi=3D"http=
://www.w3.org/2001/XMLSchema-instance" xmlns:udcxf=3D"http://schemas.micros=
oft.com/data/udc/xmlfile" xmlns:wf=3D"http://schemas.microsoft.com/sharepoi=
nt/soap/workflow/" xmlns:mver=3D"http://schemas.openxmlformats.org/markup-c=
ompatibility/2006" xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/o=
mml" xmlns:mrels=3D"http://schemas.openxmlformats.org/package/200 6/relation=
ships" xmlns:ex12t=3D"http://schemas.microsoft.com/exchange/service s/2006/t=
ypes" xmlns:ex12m=3D"http://schemas.microsoft.com/exchange/service s/2006/me=
ssages" xmlns:Z=3D"urn:schemas-microsoft-com:" xmlns=3D"http://www.w3.org/T=
R/REC-html40">


>









hi,



 



can someone of you guys telling me =
why e.g.
this command:



 



print  ("%%Escalation%%bl=
a.bla@domain.ch"     
=3D~ /\Q\%\%bla.bla@domain.ch\E$/i);



 



on a system with perl 5.10 does not=
give me
back a matching, as the same expression gives me back a matching on a perl
5.8.8 system?



 



thanks.



 



kind regards,



patrick.









--_000_7900F427F393E046A34C5266BF3FDE3419FAD1E3ABvmvito10vit od_--

--===============0296235230==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--===============0296235230==--

Re: /Q /E differences depending which Perl Version is used

am 08.12.2008 15:47:16 von Jenda Krynicky

From: Patrick Schiess
> can someone of you guys telling me why e.g. this command:
>
> print ("%%Escalation%%bla.bla@domain.ch" =~ /\Q\%\%bla.bla@domain.ch\E$/i);
>
> on a system with perl 5.10 does not give me back a matching, as the
> same expression gives me back a matching on a perl 5.8.8 system?

Most probably because it handles the @domain differently. Escape the
@. The \Q\E only affects the characters special to regexps, not the $
and @ that denotes a variable to be interpolated into the string.

Jenda
===== Jenda@Krynicky.cz === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed
to get drunk and croon as much as they like.
-- Terry Pratchett in Sourcery

_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs