RCS examples are provided to assist you in learning the software and the development of your applications on the SCC machines. The instructions provided along with the code assume that the underlying OS is Linux. If these examples are run on a different architecture, the user might need to make some changes to the code and/or the way the program is built and executed.
Perl Code Notes
All Perl code examples on the SCC must include as the first line
#!/usr/local/bin/perl which is a special line with the characters
#! followed by the path on the system to the Perl executable. If you
copy an example to another machine, you may have to edit this line based on
where Perl is installed on your system. Perl programs must also have the
execute bit set in order to run (done via
chmod u+x executable_name).
Other than this special line, any line or part of a line that follows the
number sign # character will be treated as a comment.
Hello World Example Script
It is common when learning a programming language to first write a program that
prints the string "Hello World!" to ensure that you can run the programming
language and see output on the screen.
The very basic script above can be executed by running the following
scc1% cd /project/scv/examples/perl/examples/ex01-helloworld
and it will output:
Note: Research Computing Services (RCS) example programs are provided
"as is" without any warranty of any kind. The user assumes the entire risk of
quality, performance, and repair of any defects. You are encouraged to copy
and modify any of the given examples for your own use.