Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Last Script. What now?

by Acolyte (Hermit)
on Nov 23, 2002 at 00:59 UTC ( #215307=perlmeditation: print w/ replies, xml ) Need Help??

Greetings fellow monks,

It was a sad occasion this week when I made a final update to a Perl script I maintain that is soon to be retired. It was supposed to be a temporary financial reporting solution for the company I work for, and was hacked together in record time back in 1997 by a contractor. Three years later I inherited it (the contractor was long gone), and we began an immediate love/hate relationship. I made my first update before I even new Perl, wrestling with it over one long 4th of July. Every quarter or so thereafter our paths would cross again and I'd have to mold it to accomodate whatever new twists the finance folks decided to introduce.

I cut my Perl teeth on that script, and now it's going away. What's a Perl geek to do?

Here, then, is my dilemma:

My job entails web application development for MS IIS/SQL2000. Other than my daliance with Perl, my team works exclusively with ASP/VBScript, JavaScript, and Visual Studio.NET/VB.NET. I deal very little with Sys Admin issues since our servers are maintained by another group as part of a server farm.

How can I continue to effectively use Perl in primarily MS shop? Visual Perl would be fun, but it's not really and option since no one else on my team has the knowledge to support it.

I welcome any ideas, particularly those from developers with similar environmental challenges. Two possiblities that I can think of off the top of my head are:

  • Rapid Prototyping
  • File Handling

I welcome any enlightenment that the bretheren (and sisteren!?) can provide.

Acolyte
Studying at the feet of the masters

P.S. Appologies if this is not quite right for SoPW.

Comment on Last Script. What now?
Re: Last Script. What now?
by dws (Chancellor) on Nov 23, 2002 at 01:10 UTC
    How can I continue to effectively use Perl in primarily MS shop?

    Since your company is already using ASP, you might be able to sneak in some PerlScript (an ASP plug-in that comes with ActiveState Perl for Win32). For leverage, wait until you find some text processing job that'd be a nightmare to do in VB or JScript, and show people who easy it'd be to do in PerlScript.

Re: Last Script. What now?
by TGI (Vicar) on Nov 23, 2002 at 03:00 UTC

    Well, several ideas come to mind:

    • there's the usual log munging that can be done on the back end,
    • automated project builds (perhaps using template toolkit),
    • set up a heretical server to play with stuff like HTML::Mason and the Template Toolkit,
    • Application testing, perhaps using Puffin,
    • set up a wiki for your group,
    • use perl to write your ASP code for you.

    These are some off the cuff ideas. Each of them should, however, provide you with plenty of fun projects to distract you from billable work.

    Have fun!


    TGI says moo

      How does Puffin relate to the question? Puffin is written in Python.
Re: Last Script. What now?
by Theseus (Pilgrim) on Nov 23, 2002 at 04:22 UTC
    I'm in the exact same situation as you. I love Perl, and started that at my company, but they've been making me systematically recode all my old perl web apps in C#.NET. I have to say, after learning ASP.NET and C#, I definitely see Perl in a new light. If I had to sit down today and start writing a web app of my own, I'd definitely want to write it in ASP/C#.net, but I still find uses for Perl, without a doubt.

    Next time your boss needs one of those beautiful Microsoft IIS log files examined in detail to search for something, or to munge data from it, you'll be able to show him exactly what place Perl has in your organization. It may not be the best thing for web development any more, and in reality, that's not what it's intended for, it shouldn't surprise anyone that ASP.net is more efficient for web applications.

    I still write scripts to do remote backups on servers with Perl(I'm not into server administration either, but our IT department relies on the development department to design them tools), I still write text processing scripts in Perl, I find a way to work it in for most things I have to do that aren't web-based.

    As far as everyone suggesting Perlscript for ASP.NET, you might as well not even bother. The current state of affairs is horribly broken. I posted on Perlmonks about 2-3 months ago several times asking for anyone's advice or experience with Perlscript for ASP.NET, and apparently, you and I are the only two monks who are even remotely interested.

    There would be nothing more powerful than the tools that ASP.NET puts into your hands with web controls, the .NET Framework Class Library, and CPAN all rolled into an integrated solution. I salivate at the mere thought, but then I remember that it just doesn't work. If we're all lucky, Microsoft will recognize that Perl isn't a toy language and they'll really put some effort into support and documentation for it.

      AFAIK PerlScript is NOT what you want to use with ASP.Net. You don't use VBScript either, you use VB.NET. What you want is PerlNET.

      I did not try it yet but I'd bet it would be best to the the interface related stuff in VB.NET or C# (simply something supported natively by Visual Studio.Net) and only use PerlNET to either implement things that are much easier written in Perl than in the .Net languages or to wrap up the functionality of some CPAN module.

      Jenda

        PerlNET AFAIK is just a program developed by activestate to help develop Perlscript.NET components, not the actual language itself. However, I do agree with you about what I would use Perl for in a .NET scenario, I'd stick with C# for most things and switch for things simply too much easier to do in Perl to ignore, and to take advantage of CPAN modules.
Re: Last Script. What now?
by pg (Canon) on Nov 23, 2002 at 06:30 UTC
    In my shop, no development is done in Perl, but I am using Perl all the time. What? Yes, I am using Perl almost every day. I used Perl to make small but very useful tools for myself and my teammates. Two things really contributed to my success in Perl:

    • It is such a power tool to deal with regexp, I don't see any other language can do it better;
    • The development only costs so little time, so quick, and you can even make it GUI.
    Here is a list of tools I made to help me and my friends:
    • Some guys in my shop deal with IBM mainframe. It is really a pain whenever they need to make testing JCL's from production JCL's, and test something. I made a GUI tool, which FTP JCL's from mainframe, analyzing them, converting to testing JCL's, and finally FTP them back to mainframe. regexp, of course, and I also used Net::FTP and Tk.
    • We recently got some C/C++ source code from another company, and need people to understand those source code. I made a small tool to allow programmers to view their C/C++ code in a tree view. The tool analyze the C/C++ source code and visually guide them through the calling/called function chain. Again, regexp and Tk.
    • ...
Re: Last Script. What now?
by theorbtwo (Prior) on Nov 23, 2002 at 18:20 UTC

    There's lots of places perl can still be useful to you. In log-munging, and CGI apps (though you've mostly moved to ASP, CGI can be nice for rapid-prototyping, and for building static pages with), but other people have already pointed them out to you. However, it's quite possible to call perl code from Microsoft languages, or any other language where it's possible to use COM Automation, with the Microsoft Scriptlet Control library -- just create a perl object, execute a file-do, or a use, and then execute your functions. Once people see how much easier it is to code things in perl, esp making hard things possible, they're start to code in it more and more, I suspect.

    (You're need an activestate perl install, and the microsoft scripting runtime, which is standard with IE5+.)


    Warning: Unless otherwise stated, code is untested. Do not use without understanding. Code is posted in the hopes it is useful, but without warranty. All copyrights are relinquished into the public domain unless otherwise stated. I am not an angel. I am capable of error, and err on a fairly regular basis. If I made a mistake, please let me know (such as by replying to this node).

Re: Last Script. What now?
by Steve_p (Priest) on Nov 24, 2002 at 00:42 UTC

    Simply put, there is nothing better for adhoc work than Perl. Knowing how any environment works, there is always somebody who needs "just one quick report" again and again and again. Or, if you've been lucky like me, and you work in an environment where nearly every interface between systems is broken somewhere, you need some good script to fix the database quickly, and for me Perl has done it for me.

    Although it may seem in your environment that the only way that web services can be done is with .NET, Perl (using SOAP::Lite) is the quickest way to test web services. I use Perl almost exclusively as a client to Web Services since I started using it about a month ago. I'm sure with the MSness of your environment, that web services will be popping up in your workplace.

Re: Last Script. What now?
by peschkaj (Pilgrim) on Nov 24, 2002 at 12:50 UTC

    Although the vast majority of my development work is VB.NET/ASP.NET, I do manage to get a fair amount of perl coding in.

    I use perl ALOT on our UNIX servers to eliminate the need to telnet sessions (I've pretty much replaced that with socket servers through a web interface), as well as to handle routine maintenance and clean-up and any other task that I don't want to deal with.

    Perl serves to make my job as a developer easier. I'm actually going to use it in an ASP.NET web-app, in the near future, to generate a massive amount of SVG from a SQL Server database. Because of the modules available, I'm going to be able to write this in much fewer lines of code and in much less time.

    If you make something idiot-proof, eventually someone will make a better idiot.
    I am that better idiot.
Re: Last Script. What now?
by Acolyte (Hermit) on Nov 24, 2002 at 22:05 UTC
    These are all excellent suggestions that I look forward to exploring. Thanks to everyone who replied for the solid feedback and encouragement!

    Acolyte
    Studying at the feet of the masters
Re: Last Script. What now?
by logan (Curate) on Nov 25, 2002 at 05:42 UTC
    Remember perl's strengths. Remember what perl does that C can't. Remember the original reason perl was created.

    Every once in a while, I get an assignment to write some quick and dirty tool for a specific task. About half the time, it's about text parsing. Maybe it's checking filesize, or measuring a specific parameter from netstat, or pulling a string from a web page. With perl, I can hack something together fast fast fast. Need a wrapper around a command? Perl. Need to parse a logfile? Perl.

    Perl allows you to code fast, on the fly. Perl handles text parsing better than anything else. Keep perl for the little projects, the little tools that make your job easier. Show your people something cool, and they'll come around.

    -Logan
    "What do I want? I'm an American. I want more."

Re: Last Script. What now?
by Jenda (Abbot) on Nov 29, 2002 at 00:22 UTC

    I'm in a similar environment, though we did not really start the move to .Net yet. I'm basicaly using Perl

    • as COM objects from the ASPs and VB (using ActiveState's PerlCtrl)
    • for services that do tasks that'd be much harder to write in VB/C
    • for small scripties that need to be run on the servers every now and then and do not deserve a separate service.(There's a Perl service that serves as a "scheduler". Some of the tasks need to be run once every ten minutes, some once a week ...)
    • for log mungling and parsing
    • to generate VB code
    • for various "hand-made" utilities

    Jenda

      Great suggestions! I especially like the link. Lots of food for thought there, and plenty of things to play with.

      Cheers!

      Acolyte
      Studying at the feet of the masters

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://215307]
Approved by tye
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (11)
As of 2014-07-24 07:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (158 votes), past polls