----- Original Message -----
From: "Peter Bevan" <[EMAIL PROTECTED]>
To: "raptor" <[EMAIL PROTECTED]>
Sent: Wednesday, August 09, 2000 11:05 AM
Subject: Re: println() ... printbr()


>
> > > I actually saw this in the newsgroups and thought it was a neat idea.
> What
> > > about
> > >    println $textvar;
> > > instead of
> > >    print "$textvar\n";
> > > Ever so much easier to read and write, prints the arg and appends \n.
> >
> > ]- I thought 'bout this too, but I think it is not general enought..Why
?
> > we shall then add this too :
> >
> > printbr "text";
> >
> > i.e.
> >
> > print "text<BR>";
> >
> > OR  printtd, printtr
> >
> > print "<TD>text</TD>";
> >
> > and many other like this !!!
> > current way for many prints operators is :
> > $old = $\;
> > $\ = "\n";
> > print ...
> > print ...
> > ....
> > print ...
> > $ =$old;
> >
> > OR
> > {
> >   local $\ = "\n";
> >   print ...
> >   print ...
> >   ....
> >   print ...
> > }
> >
> >
> > There shall be easier way in Perl6 for doing this ... I too get really
> tired
> > of these "\n" and <BR>'s at the end....
> > ALSO ...
>
>
> Although I agree that a println is a top idea (not only for ease of use
but
> also for cross-platform line end characters)
> the other versions you mention (printbr etc) have (in my opinion) no place
> within the Perl language. Perl is not a cgi language perse, simply one in
> which its is easy to implement and as such it should not contain web
> specific functions. That is the function of modules (such as the excellent
> CGI module, which will do those things you mentioned anyway)...
>
> >
> > print @array;
> >
> > must work like this :
> > foraeach (@array) { print "$_\n"};
> > foraeach (@array) { print "$_<BR>"};
> >
> > not like at the moment :
> > foraeach (@array) { print $_};
> >
>
> This I totally disagree with. The use of an array in scalar context does
> (and I believe should always) return it's length. It is one of Perl's
single
> most usful features (in my expirience)...
>

Reply via email to