in reply to using a string or file in qw
qw( a b c ) [download]
is equivalent to
( split(' ', ' a b c ') ) [download]
so what you want is
my @words = split(' ', $text); [download]