[prev in list] [next in list] [prev in thread] [next in thread] 

List:       amavis-tech
Subject:    [AMaViS-tech] (no subject)
From:       Arpi <arpadf () spidernet ! co ! ro>
Date:       2002-09-11 8:38:19
[Download RAW message or body]

Hello,

I have a question (sugestion) regarding part of the amavis code.
The code:

opendir(PARTSDIR, "$TEMPDIR/parts")
	or die "Can't open directory $TEMPDIR/parts: $!";
my @parts = grep { !/^\.\.?$/ } readdir(PARTSDIR);
closedir(PARTSDIR);

This is the question:
Why do you need to parse let say 100 filenames with regexp, when 
two simple shift-s will do ? I think would be much faster.

like:
my @parts = readdir(PARTSDIR);
shift @parts; shift @parts; 


Arpad














-------------------------------------------------------
In remembrance
www.osdn.com/911/
_______________________________________________
AMaViS-tech mailing list
AMaViS-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amavis-tech
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic