#Change my $sItem = @_; my $nItem = @_; # to my $sItem = pop @lsList; my $nItem = pop @lsList;