Your probably wondering why I moved your posting. You mentioned in it that you are trying to do the same in Perl and shell scripting, but that the shell scripting is what is not working.
Because that makes this a shell scripting question, I have moved it to the Unix forums to get an answer. Next time, please select the best appropriate forum based on the contents of your questioin.
Now, your question.....
Including the file in the script using the source or '.' commands (which do the same thing) is one way. If you wanted to actually read the file, line by line, you could also do something like this:
-
while read line
-
do
-
echo $line
-
done < infile
-
Hope that helps!