use strict; use warnings; while () { my ($ip,$name,$pwd) = split; print "$ip $name $pwd\n"; # do the command on those params here # } #prints #128.45.123.1 bob qwert #129.1.25.86 jane asfd)(*&^ __DATA__ 128.45.123.1 bob qwert 129.1.25.86 jane asfd)(*&^