questions
Ken Y. Clark
kclark at stein.cshl.org
Wed Mar 12 14:40:18 EST 2003
On Tue, 11 Mar 2003 xuyong1098 at sohu.com wrote:
> Dear Dr. Genevieve DeClerck,
>
> I am a novice of perl. Now I am trying to apply PERL to
> bioinformatics. I was puzzled by your scripts for SSR finding after
> reading them.
> I would appreciate it if you could give me explanation or some
> literatures for two questions
I'm not Dr. DeClerck, but I can try to answer your questions insofar
as they pertain to Perl.
> 1. about ¡°my @specs = ([2,9], #dinucl. with >= 9 repeats
> [3,6], #trinucl. with >= 6 repeats
> [4,5]); #tetranucl. with >= 5 repeat ¡®¡¯
> I could not find the this application of array {@specs = ([2,9],
> [3,6], [4,5]) } in book.
I'm not sure what the question is here, so I can't comment.
> 2.about for($i=0; $i<scalar(@specs); $i++)
> I also could find the function of scalar.
The function "scalar" is a Perl built-in. It forces the argument to
be evaluated in a scalar context. When you evaluate an array in a
scalar context, you get the size of the array (the number of elements
in the array), so in the above example, the code is saying "while $i
is less than the number of elements in the array @specs."
For more information, please execute this on your system:
perldoc -f scalar
For more information on "perldoc," do:
perldoc perldoc
For more information on Perl:
perldoc perl
I would recommend you pick up some reference material, like _Learning
Perl_ and _Programming Perl_, both published by O'Reilly.
HTH,
ky
More information about the Gramene
mailing list