[Tutor] Perl Symbology (was: Are you allowed to shoot camels?)

Smith, Jeff jsmith at medplus.com
Thu Feb 10 16:22:51 CET 2005

To all those who talked about hating the symbology in Perl and the
suggestion that it should be removed from a later version.  I just
remembered what you get for that symbology that I really do like about
Perl: variable interpolation in strings:

sprintf(newstr,"%s %d %f",s,n,r);

Becomes a little nicer in Python with:
newstr = '%s %d %f' % (s,n,r)

Although it's worse with:
newstr = s + ' ' + str(n) + ' ' + str(r)

But in my mind nothing beats the Perl statement:
newstr = "$s $n $r";

for clarity, ease of use, and maintainability.


More information about the Tutor mailing list