Don't you think the perl one you wrote looks a bit more descriptive? Using a module, you have to accept that different modules have different behaviour. That is normal. This is just like the '-c' switch of one command and that of another command means totally different things, and you must accept that.
Learning a new thing, you cannot always expect your knowledge of another environment can translate well to it. Perl is a full-blown programming language, and programs naturally need some structure so that no matter you are writing a 30-line or 30000-line program it will still be a manageable piece.
i agree. despite my complaining i think the perl code looks and somehow feels better.
i think this is the source of my complaint. i've been writing so many unix shell scripts, it's clouded my acceptance of perl and the fact that it's bound to be different.