in reply to Trying to print out only unique array values-

uniq works as I expect it to. It only prints out one "c", not two:
use strict; use warnings; use List::MoreUtils qw(uniq); my @trnAccounts = qw(a b c c d); my @unique_accounts = uniq(@trnAccounts); foreach (@unique_accounts) { # print @unique_accounts, "\n"; print $_, "\n"; } __END__ a b c d

Basic debugging checklist

http://sscce.org

Replies are listed 'Best First'.
Re^2: Trying to print out only unique array values-
by rickman1 (Novice) on Aug 16, 2016 at 19:10 UTC

    Unfortunately it did not work for me. It'll work on something simple like that for me too, but I am reading in thousands of lines and well, I am sure something was off. Thanks for your help tho!