Hi tye,
thank your for your quick answer. I had to take time to
come to know the debugger, and here is the result:

---cut-here---
~/.cpan/build/IO-Tty-0.04# perl -d try
Default die handler restored.

Loading DB routines from perl5db.pl version 1.07
Editor support available.

Enter h or `h h' for help, or `man perldebug' for more
help.

Using /root/.cpan/build/IO-Tty-0.04/blib
main::(try:5): require POSIX;
DB<1> f /usr/local/lib/perl5/5.6.1/i686-linux/IO/File.pm
1 #
2
3 package IO::File;
4
5 =head1 NAME
6 7 8 9 10
DB<2> b 159
DB<3> f try
1 #!/usr/local/bin/perl -w
2
3: use blib;
4: use IO::Pty;
5==> require POSIX;
6
7
8: $pty = new IO::Pty;
9
10: unless (@ARGV)
DB<4> n
POSIX::(/usr/local/lib/perl5/5.6.1/i686-linux/POSIX.pm:3):
3: our(@ISA, %EXPORT_TAGS, @EXPORT_OK, $AUTOLOAD) = ( );
DB<4> n
POSIX::(/usr/local/lib/perl5/5.6.1/i686-linux/POSIX.pm:9):
9: our $VERSION = "1.03" ;
DB<4>n
POSIX::(/usr/local/lib/perl5/5.6.1/i686-linux/POSIX.pm:12):
12: my $loaded;
DB<4> n
POSIX::(/usr/local/lib/perl5/5.6.1/i686-linux/POSIX.pm:24):
24: XSLoader::load 'POSIX', $VERSION;
DB<4> n
POSIX::(/usr/local/lib/perl5/5.6.1/i686-linux/POSIX.pm:26):
26: my $EINVAL = constant("EINVAL", 0);
DB<4> n
POSIX::(/usr/local/lib/perl5/5.6.1/i686-linux/POSIX.pm:27):
27: my $EAGAIN = constant("EAGAIN", 0);
DB<4> n
POSIX::(/usr/local/lib/perl5/5.6.1/i686-linux/POSIX.pm:80):

80: 1;
81: __END__
DB<4> n
main::(try:8): $pty = new IO::Pty;
DB<4> n
main::(try:10): unless (@ARGV)
main::(try:11): {
DB<4>n
main::(try:12): my $slave = $pty->slave;
DB<4> n
IO::File::open(/usr/local/lib/perl5/5.6.1/i686-linux/IO/File.pm:159):
159: return sysopen($fh, $file, $mode, $perms);
DB<4> print $fh
IO::Tty=GLOB(0x846bf5c)
DB<5> print $file
Use of uninitialized value in print at (eval 18)[/usr/local/lib/perl5/5.6.1/perl5db.pl:1521]line 2.

DB<6> print $mode
2
DB<7> print $perms
438
DB<8>
---cut-ends---

As we can see, $file is undef, so you are right with
your assumption. I also tried the code from
SYNOPSIS of the IO::Pty documentation and there is
the same error, it has an undef filename.

Now I know *what* is wrong, but I still don't know
*why*.

Is there a module experienced helper out there ???

thanx so far

there are no silly questions
killerhippy

In reply to Re: (tye)Re: Expect can't assign a pseudo-tty by khippy
in thread Expect can't assign a pseudo-tty by khippy

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.