in reply to for only returning one result

OK, had to say it...
for($i=2; $a <= 7; $a++) {
Just like in the early days of AI research... "too much A, not enough I".

{grin}

-- Randal L. Schwartz, Perl hacker