source $1
This is including a file, which is specified at the command line as your first argument. It is most likely a config file of some sort.
echo "--0--" echo $lnPARAM[0] echo $lnVAL[0]
This is printing the contents to two "arrays" to the screen, presumably they are defined in the file being sourced.

So all you are doing is:
  1. specify a config file for reading
  2. read the contents, put them into arrays for later usage
  3. loop over array contents and print them out
You generally don't "include" config files in Perl programs. Instead, you parse them out using a loop like:
while (<STDIN>) { my $line = $_; # do something with $line }
This handles contents piped in using a command like:
#cat config.txt | perl myscript.pl

More likely, though, you'll want to read a specified file using the open function.

This is probably the most simple "real" script you could write, so it is not that hard to convert this at all.

In reply to Re: Need help to convert short c shell script to perl by perlfan
in thread Need help to convert short c shell script to perl by kobiee

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.