Have a look at , for ActivePerl documentation. As an alternative to ActivePerl, there is Strawberry Perl. This section describes what is ActivePerl – a free Perl engine for Windows, Perl Tutorials – Herong’s Tutorial Examples – Version , by Dr. Herong Yang. Easily learn how to install Perl and run your first script. If you are on Windows, you may see a choice of ActivePerl and Strawberry Perl.

Author: Shajin Zululabar
Country: Germany
Language: English (Spanish)
Genre: Medical
Published (Last): 1 January 2014
Pages: 292
PDF File Size: 7.90 Mb
ePub File Size: 16.75 Mb
ISBN: 705-2-34862-709-2
Downloads: 53948
Price: Free* [*Free Regsitration Required]
Uploader: Jujinn

The widgets are identified by path names of the form. This is normally done from the command line:. By clicking “Post Your Answer”, you acknowledge that you have read our updated terms of serviceprivacy policy and cookie policyand that your continued use of the website is subject to these policies. What is Windows Script Host? It is also possible to set up direct keyboard shortcuts as we’ve done for the File New function at line This documents actkveperl Tk and useful add-on packages that are part of ActiveTcl.

For example, if you want to change the text of the button created above you might in Tcl do:.

The Tk documentation activeeprl be found here:. This example loads the “Tktable” package in order to make the table command available for createing table widgets:. We’ll make the application window contain a single button which will shut down the application if clicked.

We create a button with the name “. For example, in this case:. I am new to Perl scripting.

Next we will be taking a look at how to manipulate user input via the command prompt. We start out as all proper Perl programs should by enabling warnings and stricture at line 1 and 3.


PERL – Programming

Then, we load Tkx which will tutoriwl our main application window at line 4. The code to make this happen is:. In some cases the “synopsis” section describing the package will spell out the package name, but in cases like this we have found no better way than to look into the pkgIndex. The rest of the method name is the name of the Tk widget to create; i.

For example, in this case: By loading the Tkx module, we make the Tkx:: Next, we instantiate a new Tkx:: Clicking the button will invoke the subroutine registered with the button’s -command option.

Enabling PerlScript any other zones tutogial not recommended. We’ll have our script print to the command prompt with the print function just as we would if we were printing text to our web browser.

Arguments are sctiveperl as before. Enter Command or cmd into the display box. One source of confusion here is the adtiveperl spelling of the package name to provide to Tkx:: What’s the difference between ActivePerl and StrawberryPerl? At the top of this hierarchy we have a widget called. Remember the previous rule that an underscore in Tkx:: Aqua is the native interface of Mac OS X. You should now have some basic concept of how to manage and run PERL scripts from the command prompt of your machine.

Whether the task at hand is complex file manipulation or just a simple conversion script, your script may require some sort of user-input. A window with the text “Hello, world” should appear on your screen. Aqua applications will also need to add the “About” function on the application menu instead of the “Help” menu as is common on other tjtorial.

What Is ActivePerl?

Nikhil Jain 7, 2 20 Maintained by Matthew Sergeant. This provide a more “perlish” way to create and manipulate Tk widgets. The subroutines, or events, will be called at their designated times: After the layout of the window has been set up, we need to pass control back to Tk so that it can draw the window and invoke our callback if the button is clicked.


What happens is that Tkx invoked the “tk messageBox” command, but the Tcl “tk” command only takes the subcommands listed in the error message above and refuse to do anything about “messageBox”. A simple Google search yields several million results. Let’s look at what this code is doing. ActivePERL is the simplest of installers available and it is also free to download. ActivePerl and PerlScript are required on the webserver that is providing the webpages, but are not required on the client.

– A tutorial about Perl and ActivePerl. Installing ActivePerl. Includes examples.

Sign up using Email and Password. Email Required, but never shown.

In Tkx applications it is often convenient to use your own subclass of Tkx:: The first thing we add is the use strict statement, because that’s a good practice in general. The Tkx module provides the Tkx:: The corresponding character of the -label will be underlined and you will be able to select this entry by pressing the key when the menu is active. As an alternative to ActivePerl, there is Strawberry Perl. I’m using Perl on a Windows 7 64 bit machine.