in reply to Re: Re: redirecting stdin on windows
in thread redirecting stdin on windows

Woah, okay, lets see, what exactly is in $program? and why are you open();ing it, your not going to be able to send anything to $program unless you do something like this:
open(FIFO), ">$program") || die "Darn : $!"; #will give you a good rea +son why it can't open. the ">" says, write to this file. print FIFO "$username\n"; and so on.....
Thats assuming that $program is a writable file, and your printing the values to it..

Am I misunderstanding what you are trying to do?

--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--

perl -e '$a="3567"; $b=hex($a); printf("%2X\n",$a);'

Replies are listed 'Best First'.
Re: Re: Re: Re: redirecting stdin on windows
by waswas-fng (Curate) on Aug 20, 2002 at 19:39 UTC
    hmph, you mean |$program dont you? or do you really want him to overwrite the program? =)

    -Waswas
      Nice catch, you can also append to the program using open(FIFO, ">>$program");

      Check out:open

      --~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--

      perl -e '$a="3567"; $b=hex($a); printf("%2X\n",$a);'

Re: Re: Re: Re: redirecting stdin on windows
by arkamedis21 (Acolyte) on Aug 20, 2002 at 19:58 UTC
    $program has the path name to my executable. I am trying to open a pipe to that executable. Please look at

    perldoc perlipc
      Wow, once more, lack of sleep rears its ugly head and makes my eyes deceive me.

      Please forgive me, I'm going to take a nap now.

      --~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--

      perl -e '$a="3567"; $b=hex($a); printf("%2X\n",$a);'