You're making a system call which performs disk IO; that's likely the slow part. What happens if you build an array without making a system call or performing disk IO? If that also takes three seconds, then something is weird. Otherwise, your code behaves exactly as I expect.
Improve your skills with Modern Perl: the free book.
In reply to Re: why is my reference taking a while to execute?
by chromatic
in thread why is my reference taking a while to execute?
by perl514
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |