Best Club Penguin Bots
Hello, you are not logged in. You may log in or register.
Latest topics
» Add me on discord if you want to catch up!
Tue Feb 05, 2019 5:36 am by Gizmo92883

» Anybody else come to this forum for the memories?
Tue Jun 12, 2018 12:07 am by Cooldude21

» This forum died
Thu Mar 30, 2017 11:10 pm by _Skate_

» Introduce yourselves!
Fri Jan 23, 2015 7:21 pm by Gizmo92883

» Ozzy's Bot Script
Mon May 13, 2013 8:31 am by Pig

» Goodbye BCPB Forums.
Tue Sep 18, 2012 6:37 pm by 43nînjâ17

» Follow bot script (100% Credit to Cp-Cheater )
Sun Sep 16, 2012 4:55 pm by Dentonbrooks

» Xat Main Owner Hacker
Fri Aug 17, 2012 2:32 am by 43nînjâ17

» xat message big
Sat Aug 11, 2012 12:32 am by 43nînjâ17

Club Penguin Events

How to make a simple perl script

Go down

How to make a simple perl script

Post  Ozzyozborn13 on 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:
#!/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:
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:
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:
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.
#!/usr/bin/perl -w

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

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.

[You must be registered and logged in to see this image.]

[You must be registered and logged in to see this link.]

[You must be registered and logged in to see this link.]

[You must be registered and logged in to see this link.]

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

Back to top Go down

How do we do this?

Post  Mintoes on 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!
ak47 banana lol!


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

Back to top Go down

Back to top

- Similar topics

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