<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Neil, you asked "On a similar note, what do you use Perl for?"....
here goes....<br>
<br>
Well more recent ones of mine were to generate the internal staff
directory to HTML by traversing the corporate Active Directory users
OU. I did this as a stand alone CGI, and under MediaWiki, and then
also remoddled this to create the Snom (<a class="moz-txt-link-abbreviated" href="http://www.snom.com">www.snom.com</a>) VoIP hardphone
directory (Snom handsets, very good).<br>
<br>
Another is the <i><b>MySQL Query Cache Top</b></i>, kind of like
Mytop, which is kind of like top(1). It shows you performance of
your MySQL query cache:
<a class="moz-txt-link-freetext" href="http://www.james.rcpt.to/svn/trunk/MySQLQueryCacheTop/mysqlquerycachetop.pl">http://www.james.rcpt.to/svn/trunk/MySQLQueryCacheTop/mysqlquerycachetop.pl</a><br>
<br>
I also have an Apache module that logs access to 3rd normal form,
which I call <i><b>Log3NF</b></i>, in MySQL:
<a class="moz-txt-link-freetext" href="http://www.james.rcpt.to/svn/trunk/Log3NFHandler/">http://www.james.rcpt.to/svn/trunk/Log3NFHandler/</a><br>
<br>
I have done a bunch of Nagios tests, including:<br>
* A very thorough MySQL replication check (available at
<a class="moz-txt-link-freetext" href="http://www.james.rcpt.to/svn/trunk/nagios/check_mysql_replication/check_mysql_replication.pl">http://www.james.rcpt.to/svn/trunk/nagios/check_mysql_replication/check_mysql_replication.pl</a>,
and I think its on Nagios exchange)<br>
* A check for Bonded (teamed) interfaces under Linux to ensure that,
if you lose one link but your bond stays up, you get alerted to
this!
<a class="moz-txt-link-freetext" href="http://www.james.rcpt.to/svn/trunk/nagios/check_bonding/check_bonding.pl">http://www.james.rcpt.to/svn/trunk/nagios/check_bonding/check_bonding.pl</a><br>
<br>
I wrote (and published to CPAN) two packages:<br>
* <i><b>WWW::IndexParser</b></i> (also in Debian as
libwww-indexparser-perl) that fetches a URL, and tries to parse it
for items in the return HTML - hence, making sense of the Auto Index
pages (folders/directories) to make iterating published content
easier<br>
* <i><b>Net::Dynect::REST</b></i> (I spoke of a few weeks back)
which implements the REST API to the DNS service provider Dynect.<br>
<br>
James<br>
<br>
<br>
On 25/10/2010 12:12, Neil Hunt wrote:
<blockquote
cite="mid:AANLkTinLT4W-kJ_fh7-vQUwhavCCR99x6qgiBTa0ZqpR@mail.gmail.com"
type="cite"><br>
<br>
<div class="gmail_quote">On 25 October 2010 11:34, Peter Hallam <span
dir="ltr"><<a moz-do-not-send="true" href="http://perth.pm">perth.pm</a>@<a
moz-do-not-send="true" href="http://inatick.com">inatick.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
<div class="im">On Mon, 25 Oct, 08:58 +0800 James Bromberger
wrote:<br>
</div>
<br>
There's a couple of orders of magnitude difference here,
something worth considering.<br>
<br>
I've also looked at Neil's regex, which is slightly faster by
about 2%, and I've also looked at the tr// method, which is
slower by about 10%<br>
<br>
Finally, if you want a concise (but slow) piece of code, I
came up with:<br>
<br>
$url =~ s|([^:]+://[^/]+(:\d+)?/?)?(.*)?$|\L$1\E$3|;<br>
<br>
Regards,<br>
<font color="#888888">Peter.<br>
</font>
<div>
<div class="h5">_______________________________________________<br>
Perth-pm mailing list<br>
<a moz-do-not-send="true" href="mailto:Perth-pm@pm.org">Perth-pm@pm.org</a><br>
<a moz-do-not-send="true"
href="http://mail.pm.org/mailman/listinfo/perth-pm"
target="_blank">http://mail.pm.org/mailman/listinfo/perth-pm</a><br>
</div>
</div>
</blockquote>
</div>
<br>
"My regex" was taken from a website after I did a search. I'm
dreadful at regular expressions, and would never claim it.<br>
<br>
On a similar note, what do you use Perl for?<br>
I do everything I can in it, and say to many of my clients:<br>
"I'd rather code something in Perl in 20 minutes that do something
manually in 15 minutes".<br>
<br>
My best achievement in Perl was automating a user creation system
for a company I used to work for (with the help of Sun One
Identity Synchronisation Server for Windows).<br>
<br>
Essentially a script was run which extracted all new users from
the payroll system, then sent a list of new accounts to AD,
created those accounts, created email accounts, assigned them to
user groups (and mailing lists), and then dropped into Unix and
created proper accounts for Unix purposes, as well as Oracle
identities. This was all based on a new person's job title
(Customer Care Consultant, Credit Consultant, etc). In the end it
was about 400 lines of code in production, and around 5 times that
in development. Good times! Alas, the company no longer exists,
and I never got a copy of it when I was made redundant...<br>
<br>
Neil<br>
<br clear="all">
<br>
-- <br>
Neil Hunt<br>
Senior Consultant<br>
HuntCorp Enterprises<br>
Phone: 0412 474 140<br>
<br>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Perth-pm mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Perth-pm@pm.org">Perth-pm@pm.org</a>
<a class="moz-txt-link-freetext" href="http://mail.pm.org/mailman/listinfo/perth-pm">http://mail.pm.org/mailman/listinfo/perth-pm</a></pre>
</blockquote>
<br>
<br>
<div class="moz-signature">-- <br>
<strong>James Bromberger</strong><br>
Aus Mobile: +61 422 166 708<br>
Email: james <i>_AT_</i> rcpt.to, Web: <a
href="http://www.james.rcpt.to/">www.james.rcpt.to</a><br>
MSN: james<i>_AT_</i>rcpt.to, AIM: JamesEBromberger, Skype:
james.bromberger
<small>(<i>_AT_</i> -> @)</small></div>
</body>
</html>