Interesting idea... but I can't even get that to return an empty string:
#!/usr/bin/perl use Fcntl; fcntl(STDIN, F_GETFL, my $flags) or die "Couldn't get flags: $!\n"; fcntl(STDIN, F_SETFL, $flags|O_NONBLOCK) or die "Couldn't set flags: $ +!\n"; $_=<STDIN>; use Data::Dumper; print Dumper $_; # --> prints $VAR1 = undef;
Maybe you can construct a better case (?)
In reply to Re^3: Doubt on defined-ness
by almut
in thread Doubt on defined-ness
by waldner
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |