http://www.perlmonks.org?node_id=84480


in reply to Reading a Line into an Array

Assuming you're splitting on space-like chars, this ought to get you started:
while(<FD>) { chomp; my @array=split(/\s/); # or /\s+/ if you want to collapse whitespa +ce ... }

--
Me spell chucker work grate. Knead grandma chicken.