in reply to while statement only picks up first line
shift is destructive on @partners. By doing the shift inside the loop, you're (probably) emptying out the array, ensuring that you'll never get a match.
Since you intend to match against any element of @partners, try replacing your test with
and remove the line that's shifting off $item.if ( 1 == grep {$_ eq $username} @partners ) {
|
|---|