[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 190
  • Last Modified:

Simple perl script for SCO

Looking for perl script preferably (or something that would normally be installed with Openserver 6) that I can use to print "Hello World" type of data.  I need to know how to create it (I assume my basic vi text editing skills will do the trick), and what directory to put it.  

I want to be able to type a command from the # prompt and have it respond by executing a perl script that prints the following to the terminal window:

   Hello World!
   My name is SCO
   This is Openserver 6
0
silentreproach
Asked:
silentreproach
  • 2
1 Solution
 
Adam314Commented:
Replace the first line with the path to your perl, if different.

#!/usr/bin/perl
print "Hello World!\nMy name is SCO\nThis is Openserver 6\n";
0
 
silentreproachAuthor Commented:
I know i already accepted, but can you tell me how to comment lines in perl?  eg:

#!/usr/bin/perl
comment 1
print "Hello World\n";
comment 2
print "Monkey\n";

Will submit another question if needed.
0
 
Adam314Commented:
Comments are done with a # sign... anything after the # is considered a comment (with some exceptions, such is inside a quote...)

#!/usr/bin/perl
#comment 1
print "Hello World\n";
#comment 2
print "Monkey\n";
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now