in reply to Re^2: Checking for STDIN
in thread Checking for STDIN
What do you mean?!
Save this code to a file and test it.
#!/usr/bin/perl -wl use strict; open my $fh, '>', '/tmp/test.log' or die $!; print $fh 'STDIN ', ( -t STDIN ? 'IS' : 'is NOT' ), ' available' or di +e $!; close $fh or die $!;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Checking for STDIN
by dbmathis (Scribe) on Jul 30, 2008 at 02:09 UTC | |
by AltBlue (Chaplain) on Jul 30, 2008 at 02:16 UTC | |
by dbmathis (Scribe) on Jul 30, 2008 at 02:37 UTC |