develooper Front page | perl.fwp | Postings from March 2002

Re: TPR1 post-mortem

Thread Previous | Thread Next
F . Xavier Noria
March 8, 2002 03:04
Re: TPR1 post-mortem
Message ID:
On Fri, 08 Mar 2002 11:41:31 +0100
cizaire_liste <> wrote:

: Can someone explains me why 
: my $c = '($a="www")=~s{}{z}g;print "$a\n";die';
: eval $c;
: $^O=~s{.}{$c}ee;
: output two lines that are different ?
: ($^O is only used to have a not empty string)

I have not studied it carefully, but at first sight I see a possible
gotcha, when the pattern is {} s uses the last successful pattern that
matched (this is surely imprecise or false, I have not the Camel book
here), just to throw an idea.

-- fxn

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About