On Wed, 6 Sep 2000, Bart Lateur wrote:
Those are not the semantics of print. It returns true (1) if successful, and
false (undef) otherwise. You cannot change that. If I write print "0", it
bloody well shan't be returning false.
Oh, why not? Does anybody actually *ever* check the
On Fri, 8 Sep 2000 01:18:19 -0700 (PDT), Ask Bjoern Hansen wrote:
I really don't understand why you want to have what's printed.
It is handy, sometimes.
But I do think that the overhead of creating a longish string every time
you print something, which is then simply discarded, is not really
"ABH" == Ask Bjoern Hansen [EMAIL PROTECTED] writes:
Oh, why not? Does anybody actually *ever* check the return value of
print? I think it's not as if we'd break a lot of code.
ABH uh, what? you don't do much socket programming now, do you? sockets
ABH breaks all the time. Disks runs out of
On 8 Sep 2000, Chaim Frenkel wrote:
Oh, why not? Does anybody actually *ever* check the return value of
print? I think it's not as if we'd break a lot of code.
ABH uh, what? you don't do much socket programming now, do you? sockets
ABH breaks all the time. Disks runs out of space while
On Tue, 05 Sep 2000 18:37:11 -0600, Tom Christiansen wrote:
Those are not the semantics of print. It returns true (1) if successfSNIP
false (undef) otherwise. You cannot change that. If I write print "0", it
bloody well shan't be returning false.
Oh, why not? Does anybody actually *ever*
Tom Christiansen wrote:
Perl already *has* a print operator: "print". :-)
I think what I really want is a tee operator.
The problem with what you have there is that it hides the act of
output within an arbitrarily long circumfix operator whose terminating
portion is potentially very far
This is what I'd consider good style:
my @output =
map { $_-[0] }
sort { $a-[1] cmp $b-[1] }
map { [$_, expensive_func($_)] } # print original lines
;
(Modified from http://www.perlmonks.org/index.pl?node_id=9108)
The main point of this statement is the Schwartzian
Jon Ericson wrote:
I would want it to return @items:
@sorted = sort print @items;
I'd prefer a different name (tee?) and keep print as it is.
Pretty much all the stuff being discussed right now can be stuck in a
module:
package Print::Variations;
use Exporter;
@EXPORT =
Perl supplies an operator for line input - angle brackets. This is no
analogous operator for output. I propose "inverse angle brackets":
"Print this line.\n";
Perl already *has* a print operator: "print". :-)
The problem with what you have there is that it hides the act of
output within