Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Re: What is Perl *NOT* good at?

by DrHyde (Prior)
on Apr 21, 2004 at 08:38 UTC ( [id://346932]=note: print w/replies, xml ) Need Help??


in reply to Re: What is Perl *NOT* good at?
in thread What is Perl *NOT* good at?

PalmOS applications

You won't use perl for applications on a platform for which it's not available? Surely not! ;-) Well yeah, I suppose I wouldn't consider perl for a CP/M application either. I guess I'll just have to stick with BCPL.

I *do* use perl as part of the build process for my PalmOS apps. There's a nice set of modules (which unfortunately CPAN.pm doesn't like installing) for creating and manipulating Palm databases, so a few lines of perl is enough to slurp data from tha intarweb, parse it, and stuff into databases which my Palm app (written in C) can use.

Surprisingly, one of the areas that I don't use perl much is one which many people seem to think it excels at - one-liners. I'll just use the shell. Here, for example, is how I get a unique list of all the IPs which my mail sewer has refused to talk to today:

grep "connection from" /var/log/exim/mainlog| \ grep "refused$"|awk '{print $6}'|sed 's/\[//;s/\]//'| \ sort|uniq
The great thing about doing tasks like this in the shell as opposed to in perl is that really it's just applying a succession of filters, and the shell imposes minimal extra syntax. And I can never remember the perl command line switches.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://346932]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2024-04-19 15:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found