Output and static variables
Previous  Top  Next

1: $myname = "Heathcliff Hudginston";
2: $myageg = 15;
3: 
4: print "My name is $myname and I am $myage years old.\n";

This will create an output like this:

My name is Heathcliff Hudginston and I am 15 years old 

Pretty simple, hmmm?

*) Variables are declared with a $ and you print your output with print.
*) If you want to print a new line just write \n, for a tab write \t.

Now let's see how we can modify variables and read data from the command line: