in reply to Help with a faster loop
if ($file_path =~ /defines|sccpch|sms81154|sms97767/) { next; } elsif(!($file_path =~ /defines|sccpch|sms81154|sms97767/)) # This + is redunant { if (open(FILES, $file_path)) # use +the -f operator to test # file +s existance, or -W to test # if i +t can be written to { if (!($file_path =~ /\.lfa|\.zip|\.txt|UASTG/)) { print (DATA "$file_path\n"); } } else { die ("Could not open[$file_path], $!\n"); } ## The above is redunant... it would be better stated as: if ($file_path =~ /defines|sccpch|sms81154|sms97767/) { next; } else { if (-f $file_path) { if (!($file_path =~ /\.lfa|\.zip|\.txt|UASTG/)) { print (DATA "$file_path\n"); } } else { die ("Could not open[$file_path], $!\n"); } }
They say that time changes things, but you actually have to change them yourself.
Andy Warhol
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Help with a faster loop
by CountOrlok (Friar) on Mar 01, 2006 at 16:00 UTC | |
by Anonymous Monk on Mar 01, 2006 at 19:38 UTC | |
Re^2: Help with a faster loop
by gzayzay (Sexton) on Mar 01, 2006 at 15:06 UTC |
In Section
Seekers of Perl Wisdom