The text you have written declares two new, undefined variables named $lines.

and is a logical operator. The code you wrote takes two lists (( my $lines, $schemePOS, 20) and ( my $lines, $abiPOS, 3)) and tests if they are both logically true. Since the lists are both longer than 0 elements, and returns a true value, and this true value is then fed into substr, which expects at least two arguments, thus the returned error.

Lastly, print takes a list (parentheses), not a block (curly brackets) as an argument. Either

I have fed print a list of two values, which are the return values of the substrs. There are a number of ways to do this, but they'd all fit this general pattern.

Given your apparent familiarity with the language, I'd suggest going through some introductory learning materials. http://learn.perl.org has a number of resources available, including free access to Beginning Perl.

#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.

When putting a smiley right before a closing parenthesis, do you:

Use two parentheses: (Like this: :) )
Use one parenthesis: (Like this: :)
Reverse direction of the smiley: (Like this: (: )
Use angle/square brackets instead of parentheses
Use C-style commenting to set the smiley off from the closing parenthesis
Make the smiley a dunce: (:>
I disapprove of emoticons
Other