in reply to Generating combinatorial strings

Hi Madd, as I see it you need 3^5 strings from
00000 00001 00002 00010 ... 22222
So you need to count to a defined number (3^5) using the ternary number system.

Take a look at Math::BaseArith

print "Good ",qw(night morning afternoon evening)[(localtime)[2]/6]," fellow monks."