develooper Front page | perl.perl5.porters | Postings from May 2016

Question on open2() example in perlipc.pod

Thread Previous | Thread Next
From:
Glenn Golden
Date:
May 25, 2016 02:06
Subject:
Question on open2() example in perlipc.pod
Message ID:
20160525020628.GA4800@huh.zplane.com
In the "Bidirectional Communication with Another Process" section of
perlipc.pod (git) is this example:


    use FileHandle;
    use IPC::Open2;
    $pid = open2(*Reader, *Writer, "cat -un");
    print Writer "stuff\n";
    $got = <Reader>;

I'm curious whether "use FileHandle" serves any purpose there?  The example
seems (superficially at least) to behave identically with or without it,
and no warnings are issued with strictures and warnings enabled (except
for missing "my" on $pid and $got).

Is it there maybe for pedagogical reasons or to illustate preferred usage? 

Anyway, if it's just a leftover or should be removed, let me know, I'll file
a perlbug on it with a doc patch.

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About