Skip navigation

More About How to Get Started Writing Scripts

If you read "How to Get Started Writing Scripts" (http://www.windowsitpro.com/Windows/Article/ArticleID/50486/50486.html) last month, you know about some resources that you can use to learn how to write Windows shell, VBScript, and Windows PowerShell code. As with chocolate and potato chips, getting just a taste of learning makes you hungry for more. So, I want to cover resources that you can use to learn how to write JScript, Perl, and T-SQL code.

JScript
Like VBScript, JScript is a scripting language associated with Windows Script Host (WSH), an environment for executing scripts. Consequently, you might expect to see some WSH references in a list of JScript resources. However, that's not the case. Most WSH resources don't include information about JScript. For example, Tim Hill's Windows Script Host (New Riders Publishing, 2003) is highly recommended for learning WSH and VBScript but doesn't include any information helpful in learning JScript. Surprisingly, even the Windows scripting bible--Windows 2000 Scripting Guide (Microsoft Press, 2003)--contains no information about JScript.

Fortunately, because JScript is Microsoft's implementation of JavaScript, you can use JavaScript resources to learn JScript. One of the scripting experts I talked with got his start with JScript by reading David Flanagan's JavaScript: The Definitive Guide (O'Reilly, 2001). This book provides a solid overview of the JavaScript language.

Another book that you might read is Michael Moncur's Sams Teach Yourself JavaScript in 24 Hours, 4th ed. (Sams Publishing, 2006). Note that I said "might"; the scripting experts I talked with aren't familiar with this book. On Amazon.com, it received an average rating of 3 stars out of a possible 5. In comparison, JavaScript: The Definitive Guide received a rating of 4.5 stars. Another resource for learning JScript is the JScript Fundamentals Web page at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/0441e1e5-34e4-4d32-b188-f7fc35613478.asp.

If you run into problems learning JScript, you can talk with fellow scripters at Windows IT Pro's Scripting forum (http://forums.windowsitpro.com). This forum covers all types of scripting languages, so it's a good Web site to bookmark in your browser.

Perl
Perl is one of the harder scripting languages to learn. However, it offers some benefits, such as being able to run your scripts not only on Windows platforms but also on other platforms, such as Linux and Macintosh. The "PERL: The Practical Extraction & Reporting Language" Web page at http://www.roth.net/perl discusses some other benefits of using Perl. This Web page also has a link to the ActiveState Web site, which offers a free, ready-to-install distribution of Perl called ActivePerl. One of the most popular Perl distributions, ActivePerl includes not only the core Perl engine but also some popular Perl modules and the Perl Package Manager (PPM) for installing Comprehensive Perl Archive Network (CPAN) modules.

If you're a Perl newbie, you might be wondering what modules are. Perl modules are reusable software components that offer specific functionality. For example, the Win32::Perms module lets you modify permissions on files, directories, registry keys, network shares, and shared printers. The only way you can take advantage of a Perl module's functionality is through a Perl script--you can't run modules by themselves. The CPAN Web site (http://www.cpan.org) offers a large collection of Perl modules. The PPM for CPAN lets you install a Perl module from that Web site by typing a simple command.

After you've installed ActivePerl or another Perl distribution, you're ready to learn Perl. The book to start with depends on your background:

  • If you aren't familiar with programming concepts and would like to use Perl on cross platforms, check out Learning Perl, 4th ed. (O'Reilly, 2005) by Randal L. Schwartz, Tom Phoenix, and Brian D. Foy.
  • If you're already familiar with programming concepts and would like to use Perl on cross platforms, check out Programming Perl, 3rd ed. (O'Reilly, 2000) by Larry Wall, Tom Christiansen, and Jon Orwant. This book is considered to be the Perl bible.
  • If you aren't familiar with programming concepts and would like to use Perl on the Win32 platform only, check out Learning Perl on Win32 Systems (O'Reilly, 1997) by Randal L. Schwartz, Erik Olson, and Tom Christiansen.
  • After you have a basic understanding of the Perl language, you can focus on areas of interest to you. For Windows systems administrators, two books of interest are

  • Dave Roth's Win32 Perl Programming: The Standard Extensions, 2nd ed. (New Riders, 2001). This book covers many of the standard Win32-specific modules that come with Perl.
  • Dave Roth's Win32 Perl Scripting: The Administrator's Handbook, 2nd ed. (New Riders, 2000). This book discusses how to use Perl to automate common tasks that Windows administrators face.
  • DBAs will want to check out Programming the Perl DBI (O'Reilly, 2000) by Alligator Descartes and Tim Bunce. This book covers the Perl Database Interface (DBI), a Perl-specific interface that provides database functionality.

    If you run into problems learning Perl, I suggest visiting some of the many newsgroups and forums in which you can talk with Perl enthusiasts. Besides Windows IT Pro's Scripting forum, you can check out the forums and newsgroups listed on the Win32 Perl Links Web page at http://www.roth.net/perl/links.

    T-SQL
    T-SQL is the built-in scripting language of Microsoft SQL Server. T-SQL underwent some major changes in SQL Server 2005, so if you want to learn this scripting language, it's best to learn the 2005 version. One recently released book that might help you do so is Beginning Transact-SQL With SQL Server 2000 and 2005 (Wrox Press, 2005) by Paul Turley and Dan Wood. None of the scripting experts I talked with are familiar with this book, but it received an average rating of 4 stars on Amazon.com. Another resource is SQL Server 2005 Books Online (BOL). You can download this BOL for free at http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx.

    Because T-SQL is based on SQL, learning about SQL can be helpful. To get a background on SQL, you can check out Robert Sheldon's SQL: A Beginner's Guide, 2nd ed. (McGraw-Hill Osborne Media, 2003).

    If you run into problems learning T-SQL, you can ask questions on SQL Server Magazine's T-SQL forum at http://sqlforums.windowsitpro.com. For a list of T-SQL newsgroups and Web sites, go to http://www.insidetsql.com/resources.htm.

    This list of JScript, Perl, and T-SQL resources isn't all-inclusive. If you've come across any other helpful resources, please let me know and I'll add them to the list.

    Hide comments

    Comments

    • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

    Plain text

    • No HTML tags allowed.
    • Web page addresses and e-mail addresses turn into links automatically.
    • Lines and paragraphs break automatically.
    Publish