Perl Print Benchmark

This is a little Benchmark about the print function in Perl with var and constant.

Our first result let us see that you should use constants if possible, this makes your program faster and clear.In the other case you should interpolate the variable into the string.

Its faster to use the direct n but i think in some cases its better to use the default $/ variable.

I made the last to show you the differences you could use the way you like.

Leave a Reply

Your email address will not be published.

four × 1 =