Hello, you can use print "all the same" unless (grep {! /test_name/} @bin);
2011/7/19 Steven Surgnier <ssurgn...@gmail.com> > Hi, > > I desire a concise conditional statement which simply checks if each entry > in an array matches a given string. For example: > > print "all the same" if (grep {m/test_name/} @bins) == scalar @bins); > > #END CODE > > I thought, "grep will return the number of matches, so why not just check > to > see if it equals the length of the array?" > I'm open to any suggestions even if it's merely cosmetic. > > Sincerely, > > Steven >