in reply to Re^2: why is my reference taking a while to execute?
in thread why is my reference taking a while to execute?
May be I shouldnt use reference to anonymous arrays for storing command line outputs...
The lesson to take from this is that sometimes doing things outside of Perl can be slow. The fact of using an array isn't too relevant here.
Is that the right way of creating a reference to an anonymous array with words in it?
The anonymous array construction syntax of the square brackets is separate from the quoting delimiters used with qw//. What you ended up with is fine. (Print the contents of the array created from your first attempt and you'll probably see the problem.)
Improve your skills with Modern Perl: the free book.
|
|---|