[Pdx-pm] $#ARGV

Thomas Keller kellert at ohsu.edu
Tue Sep 19 11:42:13 PDT 2006


Thanks all, I'm out of practice.

So the error must be that the program that is calling this script is  
not getting the arguments to it.
The error message I get from the calling program (written in C) is
"Something wrong running command
/usr/local/genome/bin/findSequenceMatchesForConsed.perl
/usr/local/genome/consed_mac/assembly_view/edit_dir/ 
assembly_view.fasta.screen.ace.1 -minmatch 30
-minscore 60  Unknown error: 0 (errno = 22)"

So this program thinks it is sending a filename and two parameters,  
but the perl script isn't getting them.

The script is in a dir that had a mode of 111 (only execute). That  
looks like the problem. I chmoded to allow reading and that fixed it.

Thanks,

Tom K
kellert at ohsu.edu
4-2442


On Sep 19, 2006, at 11:26 AM, David E. Wheeler wrote:

> On Sep 19, 2006, at 11:07, Thomas Keller wrote:
>
>> 23:	if ( $#ARGV < 0 ) {
>> 24:		die $usage;
>> 25:	}
>
> Use this, instead:
>
> 23:	unless( @ARGV ) {
> 24:		die $usage;
> 25:	}
>
> It's easier to read, too.
>
> Best,
>
> David
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.pm.org/pipermail/pdx-pm-list/attachments/20060919/497eace9/attachment.html 


More information about the Pdx-pm-list mailing list