Lemme reiterate Malkavian's suggestion in Re: passing values to another perl program; as we can now tell from your posted code, you're snagging individual lines from the one file, and interpolating those values into your backticks; but as he suggested might be the problem, you've got newlines in there and so the -t is seen as the beginning of a new command. Here's one way to rewrite your code:
open (EXT, "LDB_EXTID.lst") or die "something"; my @uids = <EXT>; # read in each line as a member of the array close EXT; # here's the key line ! chomp @uids; # remove any trailing newlines from every member of @uids foreach my $uid (@uids) { my $output = `ldbtest.pl -e $uid -t 123`; last if ++$counter > 10; } # stuff you'd do after the loop, if anything
perl -e 'print "How sweet does a rose smell? "; chomp ($n = <STDIN>); +$rose = "smells sweet to degree $n"; *other_name = *rose; print "$oth +er_name\n"'
In reply to Re: Re: Re: passing values to another perl program
by arturo
in thread passing values to another perl program
by treebeard
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |