#!perl -w use strict; # This would come from the database my @data = ( ['Hello','World',1,2,3,4,5], ['Hello','Pakeidoprek,6,7,8,9,0], ); while( my $item = shift @data) { ... problematic part ... };