Package: perl
Version: 5.10.0-16
Severity: normal

The readline function or something like <FILE> sets $! to
"Bad file descriptor" when there are no errors, as shown by
the following Perl script:

#!/usr/bin/env perl
use strict;
my $line;
do
  {
    undef $!;
    $line = <>;
    print "Error: $!\n" if $!;
    print "Line: ", defined $line ? $line : "undef\n";
  }
while (defined $line);

I get:

$ echo foo | ./readline
Error: Bad file descriptor
Line: foo
Line: undef

Note that I don't have this problem under Mac OS X.

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.26.5-20080922 (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=POSIX, LC_CTYPE=en_US.ISO8859-1 (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash

Versions of packages perl depends on:
ii  libc6                         2.7-15     GNU C Library: Shared libraries
ii  libdb4.6                      4.6.21-11  Berkeley v4.6 Database Libraries [
ii  libgdbm3                      1.8.3-4    GNU dbm database routines (runtime
ii  perl-base                     5.10.0-16  minimal Perl system
ii  perl-modules                  5.10.0-16  Core Perl modules

Versions of packages perl recommends:
ii  netbase                       4.34       Basic TCP/IP networking system
ii  perl-doc                      5.10.0-16  Perl documentation

Versions of packages perl suggests:
ii  libterm-readline-gnu-perl     1.17a-2+b1 Perl extension for the GNU Readlin
ii  libterm-readline-perl-perl    1.0302-1   Perl implementation of Readline li

-- no debconf information



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to