printing records containing a pattern
Ruby is better.
ruby -ane 'puts $F.grep(/xyz/).join(" ") if /xyz/'
Since you've twice insisted on excreting your perls
here, I'm going to quote E.R.K.:
Perl: lowering programmers' expectations since 1987
Perl's motto is "There's More Than One Way to Do It", but I'm lobbying
for "There's No Good Way And Infinitely Many God-Awful Ways To Do It".
Larry Wall, Perl's creator, said "Be consistent," and Perl is
consistently atrocious for programs of more than 9 characters in
length.
Larry Wall apparently loves being quoted as much as he loves to end
his quotes with a smiley emoticon. Here are some of his (too freaking
many) "gems." Originally I'd planned on singling out only a few -
almost every word of his demands not only a debunking but a sound slap
on his head - but the more I read of his self-important,
omniflatulence, the more nauseous and fascinated I became, and was
compelled to read more. It's not often that you encounter as flaccidly
masturbatory a cult of personality as the Perl "community," and its
leader takes the (urinal) cake.
What you'll need most is courage. It is not an easy path that
you've set your foot upon.
Courage, and an air-sickness bag. The above should be inscribed on the
entrance to the Tenth circle of Hell, reserved for those who
evangelize Perl.
I don't know if it's what you want, but it's what you get. :-)
Another potential slogan for the fetid language.
The trick is to use Perl's strengths rather than its weaknesses.
Another revelation from the master; the "trick" here, of course, is
that Perl has no strengths.
Just don't compare it with a real language, or you'll be
unhappy... :-)
No need to compare; anyone with a brain is unhappy already.
It's downright ugly. But never mind that. It's the Magic
that counts.
If there were Magic, this might be true. But in software, beauty and
magic go hand-in-hand.
We're trying to make Perl a better language than Perl. That's all.
Nothing like setting your sights so low that, in a community of the
undereducated and hyperstimulated, almost any change, regardless of
effect, will be heralded as a Major Advance In Coolness.
Since it's not possible to understand Larry, it's not possible to
understand Perl either. But that's okay, because Perl is a bit
like those early chemistry sets. You didn't really have to
understand what you were doing in order to do interesting things.
You might blow yourself up, but more likely, you'd have a great
deal of fun.
Yes, Larry is the depth of inscrutability - I'm sure that despite his
reams of braindead prosaic output, there are just hidden wellsprings
of depth and wisdom there. More egomaniacal stroking. I'm sure any
chemical or manufacturing company would be less than delighted to have
to hire undisciplined buffoons whose experience consists of producing
sulfuric emissions using a child's chemistry set (when they're not
doing it with their sphincters); unfortunately, the business world
isn't quite as unf****ving, so assumes that any monkey capable of
repeatedly running a text file through perl.exe is a programmer and
worthy of employment in their mission-critical enterprise development
team.
... Perl is designed to let you program naturally. Whatever you
think natural means.
The ongoing vague references to "natural language" are ironic, given
that Perl's tower of babble results in code barely readable by its
author, much less by other victims forced to "maintain" the glorious
hieroglyphics vomited forth.
|