user:passer use:pass user1:pass1 That was $list; these are the elements of @arr: user:passer $first: user & $second: passer use:pass $first: use & $second: pass user1:pass1 $first: user1 & $second: pass1