On 3/8/06, Kathryn E. Bushley <[EMAIL PROTECTED]> wrote: > Maybe not a perl question but I'm trying to run my perl program below and > am getting the following error which I'm fairly certain is from the linux > system: > > >(BC1G_02948.1) AMP 1/1 144 522 > sh: -c: line 0: syntax error near unexpected token `(' > sh: -c: line 0: `getseq.pl 56 374 (BC1G_03519.1) Botrytis_annotations'
The prefix of those two lines is "sh:", leading me to believe that this is a message from /bin/sh, the shell. > #call up the getseq program > $seq = `getseq.pl $start $stop $proteinID $protein_filename`; It looks as if this is where the shell is getting involved. Backquoted strings use shell command syntax, and parentheses are meaningful to the shell. One solution would be to try to fix up the command line: Use a little programming to make a string that is a correct shell command, then execute that. Another solution would be to see whether getseq.pl could be turned into a library or module. Better yet, see whether it's already been done. Have you looked on CPAN? There's probably a module to do what you're doing in backticks, and I'd imagine it to have roughly a tenth of the overhead of running a command in backticks and parsing the output. That could save you a lot of runtime if you would otherwise be running that command in backticks hundreds of times. http://search.cpan.org/search?query=getseq&mode=all Hope this helps! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>