Which is why I format the ST thus:
@a = map { $_->[0] } sort { $a->[1] <=> $b->[1] || $a->[ 2 ] cmp $b->[ 2 ] } map { [ $_, COMPLEX EXPRESSION ] } @b;
It makes the map / sort / map structure immediately apparent and allows for arbitrary complexity within the blocks, including multiple lines and even local variable declarations to be used without getting into that whole obfu-style thing.
A similar layout lends itself to the GRT:
@a = map{ substr $_, 16 } sort map { m[...(\d+)...( \d+.\d+)...([a-z]4)...] or die "Illformed data '$_' +"; pack 'A4dNA*', $3, $2, $1, $_ } @b;
I never format single line if or else blocks one line either for same reason that doing so obscures the structure of the code.
I also like the consistancy with map/grep/sort chains and normal assignment. That is: result = manipulation of inputs
P6 has the pipe operators which allow you to reverse the flow src ==> tmp => dst, but I don't forsee me using that. I guess I grew up with assemblers, and even cpm/pip where dst = src was the way of things.
In reply to Re^9: Thread on Joel on software forum : "I hate Perl programmers."
by BrowserUk
in thread Thread on Joel on software forum : "I hate Perl programmers."
by techcode
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |