Best Club Penguin Bots
Hello, you are not logged in. You may log in or register.

Join the forum, it's quick and easy

Best Club Penguin Bots
Hello, you are not logged in. You may log in or register.
Best Club Penguin Bots
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Similar topics
Latest topics
» Add me on discord if you want to catch up!
How to make a simple perl script EmptyTue Feb 05, 2019 5:36 am by Gizmo92883

» Anybody else come to this forum for the memories?
How to make a simple perl script EmptyTue Jun 12, 2018 12:07 am by Cooldude21

» This forum died
How to make a simple perl script EmptyThu Mar 30, 2017 11:10 pm by _Skate_

» Introduce yourselves!
How to make a simple perl script EmptyFri Jan 23, 2015 7:21 pm by Gizmo92883

» Ozzy's Bot Script
How to make a simple perl script EmptyMon May 13, 2013 8:31 am by Pig

» Goodbye BCPB Forums.
How to make a simple perl script EmptyTue Sep 18, 2012 6:37 pm by 43nînjâ17

» Follow bot script (100% Credit to Cp-Cheater )
How to make a simple perl script EmptySun Sep 16, 2012 4:55 pm by Dentonbrooks

» Xat Main Owner Hacker
How to make a simple perl script EmptyFri Aug 17, 2012 2:32 am by 43nînjâ17

» xat message big
How to make a simple perl script EmptySat Aug 11, 2012 12:32 am by 43nînjâ17

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search
Club Penguin Events
Advertisement

How to make a simple perl script

2 posters

Go down

How to make a simple perl script Empty How to make a simple perl script

Post  Ozzyozborn13 Sat Nov 20, 2010 11:57 pm

Hello, In this tutorial I will show you how to make a simple perl script that says "Hello World!" on your screen.

Step 1: Open Notepad or Notepad++ on your computer.

Step 2: Write this on the first line:
Code:
#!/usr/bin/perl -w
The Purpose of this is to tell the system that it is a perl script.

Step 3: Press Enter 2 times and write this:
Code:
print "Hello World!\n";
Print is one of the most commonly used functions in perl. It tells Perl to display what is in the quotes on your screen. Remember not to capitalize print or else it wont work. The \n tells perl to begin a new blank line on the screen after the text.\

Step 4: Write this on the next line:
Code:
sleep 2;
Basically what this does is tell perl to pause for 2 seconds or you can replace the 2 with any number you want. It just gives you time to read it, if you dont add this the script will just quickly open and close in under a second.

Step 5: Write this on the next line:
Code:
exit;
As you probably guessed this tells perl to close the script. Now for this script it is not necessary because after it stops pausing and there is no more coding it will just close.

When you are done it should look something like this.
Code:
#!/usr/bin/perl -w

print "Hello World!\n";
sleep 2;
exit;

If you want to learn how to script in perl then you shouldn't just copy the script right there ↑. The purpose for this tutorial is for you to learn.

Thanks for reading.
Ozzyozborn13
Ozzyozborn13
Admin

Posts : 211
Reputation : 19
Join date : 2010-08-28

https://www.youtube.com/ozzyozborn13

Back to top Go down

How to make a simple perl script Empty How do we do this?

Post  Mintoes Sat Feb 05, 2011 1:08 pm

How do we like um make the script? It just says its a code. I do not get this at all!
confused
ak47 banana lol!

Mintoes

Posts : 11
Reputation : 0
Join date : 2011-01-30
Age : 22
Location : Earth

http://mintoescp.wordpress.com

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum