haleemul has asked for the wisdom of the Perl Monks concerning the following question:

Hi all, I do product testing and design for my company. I'm a EE major. I have a question about Perl. We have a lot of cpu boards that were designed by someone 10-15yrs ago and these boards are now failing. So they are coming in from the field and we really don't know what to do. We've tested them ad hoc mode and the success rate is not very good. Also we're wasting our time and resources on doing something like this. So, this is basically just a stab in the dark but can perl be used to troubleshoot something like this? Thanks.

Replies are listed 'Best First'.
Re: hardware troubleshoot with perl ?
by Joost (Canon) on Feb 11, 2008 at 21:32 UTC
    How are you testing the boards? Does it involve a lot of repeating steps? What OS are you using to test them (I'm assuming you're not going at the boards with a simple multi-meter) :-)

    Perl is pretty good at automating software. If you want to look at it that way, it's a sort of shell scripting on steroidstm.

    If you're dealing with win32 GUI tools, you may be interested in Win32::API and Win32::GuiTest. If you want to run and check the output of DOS/Win32/Unix/Other command-line tools, see perlopentut and possibly perlipc.

    If you're dealing with applications that have a well-defined API, it's possible you can find a module to interface with it at http://search.cpan.org. If the program (or library) has some sort of C API, you can probably get it to work with Inline::C, or failing that the more powerful (but more intricate) XS.

    You may find it helps to be more specific in your questions. :)

Re: hardware troubleshoot with perl ?
by pc88mxer (Vicar) on Feb 12, 2008 at 06:20 UTC
    I do embedded development, and I use perl to help me debug my designs. However, I should add that so far I haven't needed to do anything faster than "serial port" speeds. Also, I don't need any "low-level" access to my computer's hardware.

    If these apply to your situation, then I'd suggest you look into perl. It's great for ad-hoc programming, and CPAN has a rich collection of general purpose modules. For instance, the Test Anything Protocol has a large suite of supporting modules, and you really can use it for testing anything, not just perl code.