Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: passing values to another perl program

by Malkavian (Friar)
on Jul 09, 2001 at 21:01 UTC ( #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
Node Status?
node history
Node Type: note [id://95055]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2020-04-04 00:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The most amusing oxymoron is:
















    Results (32 votes). Check out past polls.

    Notices?