Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: passing values to another perl program

by Malkavian (Friar)
on Jul 09, 2001 at 21:01 UTC ( [id://95055]=note: print w/replies, xml ) Need Help??


in reply to passing values to another perl program

Just a thought here..
In your code, you're pulling part of the command line from a file line by line
It's quite likely that this line contains the newline string, which, when inserted before the -t causes the shell to believe that you're trying to type two seperate lines (thus it's actually trying to do a :

sh ldbtest.pl -e aa100001<newline>
sh -t 123

Try using a chomp on the value you interpolate into the piped open, or backticks, and see if that helps any.

Cheers,

Malk
  • Comment on Re: passing values to another perl program

Replies are listed 'Best First'.
Re: Re: passing values to another perl program
by treebeard (Acolyte) on Jul 09, 2001 at 22:36 UTC

    ahhhh the chomp worked! i guess i should have paraphrased the advice of my latin teacher when practicing translating...."when it doubt, chomp" that you monks!

    ..and thank you for the advice on Open3(), i was curious about how that would work...

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (6)
As of 2024-04-19 09:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found