Thread /o Modifikator (20 answers)
Opened by Gast at 2004-07-20 14:20

Taulmarill
 2004-07-20 14:59
#84630 #84630
User since
2004-02-19
1750 Artikel
BenutzerIn

user image
aus http://www.perldoc.com/perl5.8....erators
c Do not reset search position on a failed match when /g is in effect.
g Match globally, i.e., find all occurrences.
i Do case-insensitive pattern matching.
m Treat string as multiple lines.
o Compile pattern only once.
s Treat string as single line.
x Use extended regular expressions.


der regex wird nur einmal compiliert, bei der interpoleration von variablen wird also z.B. nur das erste mal wenn der regex benutzt wird der wert der variable eingefügt, weitere änderungen an der variable werden ignoriert.
$_=unpack"B*",~pack"H*",$_ and y&1|0& |#&&print"$_\n"for@.=qw BFA2F7C39139F45F78
0A28104594444504400 0A2F107D54447DE7800 0A2110453444450500 73CF1045138445F4800 0
F3EF2044E3D17DE 8A08A0451412411 F3CF207DF41C79E 820A20451412414 83E93C4513D17D2B

View full thread /o Modifikator