http://qs321.pair.com?node_id=533656


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