Some pointers:

> if ( scalar @ARGV > 0 )
> { @testList = @ARGV;
> }

The use of "scalar" here is superfluous "if" and "==" force a scalar
context.

> if ( $level =~ m/^1.*/ )
> { push @testList, @originalTopPagePlusFlack;
> }

Note that this will match if $level is 10-19, 100+ etc as well. Your
original test ($level == 1) is more reliable.

> elsif ( $level =~ m/^2.*/ )
> { push @testList, @anotherTopPagePlusFlack;
> }

Same as above.

> elsif ( scalar @ARGV == 0 ) # still feels funny
> { @testList = @basicTopPage;
> }

Same as first.

> elsif ( $level =~ m/^0.*/ ) # 0
> { push @testList, @basicTopPage;
> }

This could simply be $level == 0, unless $level *must* begin with a zero.
Remember that all of these values of $level would be true considering $level
== 0: "sljkhfglkjh" "" "0" "0sfjksh" hjdf45lkdjsf098" undef


Keary Suska
Esoteritech, Inc.
"Leveraging Open Source for a better Internet"

Reply via email to