Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Re: Re: redirecting stdin on windows

by defyance (Curate)
on Aug 20, 2002 at 19:21 UTC ( [id://191570]=note: print w/replies, xml ) Need Help??


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);'

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://191570]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2024-03-29 05:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found