cd /tmp touch foo1.foo foo2.foo foo3.foo perl -le '$f=<*.foo>; print "scalar: $f"; @f=<*.foo>; print "array: @f"'