pel, how to pass a parameter to a shell program

#!/usr/bin/perl

$MYDIR = `pwd`;

#How do I pass $MYDIR to my shell script.
`.\myshellscript.sh`;
rgbcofAsked:
Who is Participating?
 
TintinConnect With a Mentor Commented:

system "/path/to/myshellscript.sh $MYDIR" and die $!;

Open in new window


or

system "/path/to/myshellscript.sh",$MYDIR and die $!;

Open in new window

0
 
rgbcofAuthor Commented:
That's great.  Thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.