thor has asked for the wisdom of the Perl Monks concerning the following question:
I'd never seen the angle operator used on an array before, but it seems to do the right thing, just really slowly. Does anyone have any ideas as to what is happening? I couldn't find any references anywhere. I've since suggested something like this:opendir AREA, "/files1/logs"; @job_logs = grep /job_log/, readdir AREA; print "Got my list of files\n"; while (<@job_logs>) { print "File: $_\n"; }
So, the question is more academic at this point.while(</files1/logs/job_log*> { print "Log: $_\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Why is @array so slow?
by japhy (Canon) on Feb 26, 2002 at 03:09 UTC | |
|
Re: Why is @array so slow?
by dws (Chancellor) on Feb 26, 2002 at 05:14 UTC | |
by thor (Priest) on Feb 28, 2002 at 23:05 UTC | |
by dws (Chancellor) on Mar 01, 2002 at 00:20 UTC |