Hi Chris,
the
#!perl -l
or
$\ = "\n";
options are not what I want, because they do not provide
the possibility of a simple "print" without "\n".
And: These are extra lines that have to be remembered,
to be typed, to be viewed by and to be explained to pupils.
That is also true with the (funcional correct) solution
sub printl { print @_, "\n" } .
As soon as I have to print more than 1 line I have to express
"\n" and I need one of those possibilities!
A scripting language has to "make the easy jobs easy",
and printing is the very-very easiest job, and the job
most often needed, especially by beginners.
The thing is:
When I prepare teaching material for beginners
most of the scripts have only very few lines (and
this is the best propaganda for Perl).
If I have such a short sriptlet of, say, 3 lines,
then this one extra line is a real surplus burden of 33 percent.
And it steels much of the attention of a pupil.
And it is error attracting:
Pupils would wonder why "print"
behaves sometimes this way
and sometimes another way,
sometimes "printl" works and sometimes does not.
All these
#!perl -l
$\ = "\n";
sub printl { print @_, "\n" } .
print ........, "\n"
are too complicated.
Why could Pascal afford that "writeln",
and Perl can not?
Please excuse me for being off topic regarding the
MacPerl editor’s question,
and thank you for your attention.
Detlef
Chris Nandor wrote:
> sub printl { print @_, "\n" }
> or
> #!perl -l
> or
> $\ = "\n";
> --
> Chris Nandor [EMAIL PROTECTED]
> Detlef Lindenthal wrote:
> >And another wish:
> >MacPerl would gain a lot of elegance if we could have
> >a command " p r i n t l ";
> >so instead of writing
> > print $i++, "\n" ;
> >one could type
> > printl $i++;
> >this for sure looks better and saves lots of
> >keyboard acrobatic.