Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
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.

In reply to Re: Re: What is Perl *NOT* good at? by DrHyde
in thread What is Perl *NOT* good at? by jfroebe

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

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

    No recent polls found