while () #this is my opened file { { next if /^\s*File/; #remove line starting with filename ($id, $seq) = split; push @{$species{$id}}, (split //, $seq); }