in reply to Beginner - what is the function of these square brackets

Are you creating an anonymous array and putting the object reference in it and then passing the anonymous array reference to the function?
That is exactly what you are doing.

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