in reply to ease binmode STDIN; binmode STDOUT

The sub BEGIN, which is a perverse way of simply writing a BEGIN block, is completely unnecessary, and obfuscates this code needlessly. Just a simple version will do:
binmode STDIN; binmode STDOUT; 1;

-- Randal L. Schwartz, Perl hacker

Replies are listed 'Best First'.
Re: •Re: ease binmode STDIN; binmode STDOUT
by svad (Pilgrim) on May 17, 2002 at 05:15 UTC
    you're right.

    When I inserted a code I thought "is that BEGIN really necessary" but decided to insert code as it was in my file, although it can be reduced.

    Vadim.