[ic] Tips from Racke

Joachim Leidinger interchange-users@interchange.redhat.com
Wed Oct 10 04:31:01 2001


"Stefan Hornburg (Racke)" wrote:
 [DEL]
> > > You know about $var =~ s/.../.../g; ?
> >
> > Hmmm...I've no clue what you mean. It seems to me, I've a knot in my
> > brain and this knot prevent my brain to understand you. :-(
> 
> Optimization for the stuff above:
> 1. use two statements only
> [perl]
> $Safe{'scratch'}->{'morestuff'} =~ s/HREF/class\=\"treffer\"\ HREF/g;
> return '';
> [/perl]

Aah! I get the picture!

> 2. return is not necessary
> [perl]
> $Safe{'scratch'}->{'morestuff'} =~ s/HREF/class\=\"treffer\"\ HREF/g;
> '';
> [/perl]
> 3. SYNTAX =~ s/MV/IC/;
> [perl]
> $Scratch->{'morestuff'} =~ s/HREF/class\=\"treffer\"\ HREF/g;
> '';
> [/perl]
> 4. calc is faster than perl
> [calc]
> $Scratch->{'morestuff'} =~ s/HREF/class\=\"treffer\"\ HREF/g;
> '';
> [/calc]

Thank you a lot for the lesson! But when should I use [perl] instead of
[calc]?
Why not using [calc] only? 

[DEL]

ciao

Joachim

-- 
Hans-Joachim Leidinger | Dipl.-Phys.Ing. Entwicklung eCommerce
[Hans-Joachim.leidinger@bpanet.de]
Black Point Arts Internet Solutions GmbH
http://www.bpanet.de