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.