in reply to Re: file test operations
in thread file test operations

Are there more efficient programming languages that I should be aware of?

Javafans answer was a bit sarcastic because it doesn't really make sense to ask about efficiency around an open (which is maybe a thousand times slower than the following test you are worried about.

There are faster languages about, for example C/C++ and assembly language. But that doesn't mean that YOU are faster in programming them. Or that it is as much fun programming in them. Tasks that are done in perl with a few lines need sometimes hundreds of lines in C. Pray that you have a fitting library at hand.

For example, Hashes are used extensively in modern languages like perl, they are the bred-and-butter data structure and used for 80% of all data storage in a program. In C/C++ you can either:
a) use a self-made data structure perfectly fitting the job, you only need 5 days instead of 1 to write the program and it might be noticably faster or not.
b)use a hash library to get nearly the comfort of perl but also the same speed as perl for the handling of the data structure

Don't get me wrong, if speed is all you care about, then use C/C++. If you need to write programs that have to make full use of every single memory bit and processor cycle of your machine, use C/C++. If you need to write low level hardware driver stuff, use C/C++. If you want to write programs faster, securer, testable, have better debugging, with more ease, have more libraries to choose from, want to use hashes and regex and other modern features extensively, want to program for the web or other high-level areas (i.e. far form the hardware), use perl.

Note that you can combine perl and C-code (with limits) so it is often possible to write perl code and optimize the critical code parts with C code, if run time is critical