Sea of Noise

Mon, 10 Jul 2006

Perl's print() Returns 1 On Success

Holy face of Jesus in a pot roast, Batman! Why does print() return 1 on success?


Who woulda thunk it?

Not me, that's for sure.

Explains a lot, though.

Obviously there's some kind of Deep Magic afoot about which I am blissfully ignorant..

I guess it's so you can write stuff like this:

print "foo" || die "Couldn't write our stuff\n";

We now return to our regularly-scheduled programming.

[/it] permanent link

Syndicate Me via RSS!

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.

Powered by Blosxom!