![]() |
|
|
||||||
| Global Tutorial You have sometutorials & Guides share in here to help other learn. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
|
Running perl scripts
Before you can run Perl, you have to install it on your system. If you haven't done so already, go to To view links or images in this forum your post count must be 1 or greater. You currently have 0 posts. for more instructions. At this stage, you don't have to do the the Personal Web Server or Perl via PWS installations and you should leave them for a later lesson. Installing Perl should be quite quick and simple, so go ahead and get it in place. Make sure you reboot before continuing. For the first part of this course, we'll be running perl scripts in a DOS window. This means we're going to be typing words in. Yes indeed, a command line environment instead of a Windows GUI! Yuck or yay, depending on your point of view. Once you've installed perl and rebooted into Windows, bring up a DOS window. It doesn't matter what directory you are in for now. Just type in: perl -v and you should get back a screenful of version information from perl. If you get a "bad command or filename" message, Perl isn't properly installed. See if you can fix it. Running your first Perl script: Hello World! Now it's time to feel like you're getting somewhere. You're going to write your first perl script. Go back to your DOS prompt and this time, make sure you're working in a directory where you can edit a file or two. Use notepad or some simple text editor (not MS Word!) to create a file with this line in it. You can cut and paste it directly from here: print "hello world\n"; Save the file as "hello.pl" and turn to your DOS session and type: perl hello.pl The screen should show hello world right underneath. Congratulations, you've just run your first perl script! Now you need to learn a bit more about the language so you can create something more interesting. To view links or images in this forum your post count must be 1 or greater. You currently have 0 posts. |
|
|
![]() |
| Tags |
| perl, running, scripts |
| Thread Tools | |
| Display Modes | |
|
|
|
Powered By underground-zone.org - Skin Design & Modify By -AnaRchy-99- |