This is a demo of a perl script Print the date inside a table:
Wed Apr 17 22:29:48 EDT 2024

I will now do a WC on testscript.pl which will print the wc of this file to the screen. I said in class that you could do cat on this file, and you can, but there are issues regarding new lines. So I am linking to the text version of this instead. Note that to run the script in your own directory, you will have to rename it testscript.pl not textscript.txt
Here are the results of word count:
121 685 4436 testscript.pl
See the code
By the way, a good website that I have been looking at for some of these examples is http://www.comp.leeds.ac.uk/Perl/basic.html
Now I am going to call a C program called helloworld

The C-code is simple enough, but here is is regardless. Note that the exe is ./helloworld and it is chmodded to 700 helloworld.c
Here is a sample form with submit, etc. Note that one could have made the form on a different page than the action went to, but it is possible to be the same page

Enter two numbers and whether you want to ADD or MULTIPLY them

Your first number is:

Your second number is:

Your operation is :

Result is:

lastly, demonstrating arrays and hash lists (look at the code file for this part... First arrays:

Original array : apples pears bananas
First value in 2nd spot: bananas

New array is: apples pears tomatoes bananas eggs
The 2nd element is : tomatoes
Here is the hash example: Note some people call these associative arrays instead of hashes

here is the grade that the student accessed by key "Daniel" got: C