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":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.