in reply to Re: Re: Simple array sorting
in thread Simple array sorting
Who is supposed to learn from this exercise? What are they supposed to learn? You've got a bitwise XOR seeding srand, rand, regular expressions, and the infrequently used int. At the same time, the surrounding code is blatantly obtuse: my declarations in the operations that use them, a braindead for loop, an even worse foreach, reuse of variable names. I mean, you've got high-level constructs surrounded by horrifically poor code. If this test is intended for someone relatively new to Perl, there is no way they are going to find some minor error in your code, because they're going to be too busy wondering what ^ means and what the difference is between / / and / */! On the other hand, if you're looking at a mid- to upper-midlevel Perl coder who actually knows what those things do, you're wasting their time having them wade through garbage that they ought to be smart enough not to write in the first place.
Seriously, if you want someone to learn Perl, focus on proper use of the language, such as making smart choices regarding control statements and data types given certain needs. Save the tricks for entertainment purposes, because all the learner is going to get out of it is a feeling of bewilderment, but that is not the point of instruction.
|
|---|