Rob Dixon wrote: > <[EMAIL PROTECTED]> wrote: >> >> The Advantage is you get to use the switch statement. The disadvantage is >> your code will run extraordinarily slow because the Switch module uses a >> run time Filter. In short: isn't an is-elsif-else statement enough?? > > Are you saying that 'if-elsif-else' is a compile-time filter? It isn't. > So I guess 'if-elsif-else' runs extraordinarily slow too. > > AFAIK Switch allows coding that runs no more slowly than 'if', and lets > you express some solutions much more neatly. > > Rob
last time i benchmark a source filter, it's about 100 times slower. has that change since v5.8? david -- sub'_{print"@_ ";* \ = * __ ,\ & \} sub'__{print"@_ ";* \ = * ___ ,\ & \} sub'___{print"@_ ";* \ = * ____ ,\ & \} sub'____{print"@_,\n"}&{_+Just}(another)->(Perl)->(Hacker) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>