How do I invoke a perl program from within another perl program?  I don't
need to use a module or create one for this purpose.  I have a simple script
which performs a replacement:

substitute.pl
#!/pkg/public/bin/perl -pi.bak  This edits a file and creates a backup of
the edited.  This is why I want to keep it separate, so other users may call
it to 
                                make the replacement when needed.

s/^\#(shell\s.*tcp\s.*\sin.rshd)$/$1/;

I want to call the above script from another longer one to just perform the
replacement passing a file name as the argument.  The lines on the calling
file should look as follows:
:
Some other steps.
:
#Editing myfile lines
 
$myfile="/scratch/scripts/filetoedit";

I must call the substitute script here passing $myfile as argument.

Please, give me some advice to perform this operation.


Regards,

Yanet

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to