It is currently Tue, 17 May 2022 02:15:24 GMT



 
Author Message
 Passing a variable from a Perl script to a shell script
Hi,

I want to submit a form which has only one password field (Perl) and
the password should be submitted to a shell script.  In the shell
script, I want to process the pssword and use some crypting commands
to Encrypt it.

I do not know how I can process the password from Perl to shell and
how to obget it in Shell

Any help is appreciated. Thanks!



 Mon, 12 Feb 2007 22:19:01 GMT   
 Passing a variable from a Perl script to a shell script

To call a shell script from perl, use the "system" statement in Perl.
Example follows.

Here is a perl script, tmp.pl
$password="test123";
system("tmp.sh $password");

Here is the called one-line shell script, tmp.sh:
echo "$1"

Here is how to run the perl script:
$ /usr/bin/perl tmp.pl

tmp.pl calls tmp.sh which outputs:
test123



 Wed, 14 Feb 2007 02:15:18 GMT   
 
   [ 2 post ] 

Similar Threads

1. Passing a variable between shell script and perl script

2. passing argument between Bourn shell and Perl script

3. Passing variables as arguments to commands in a shell script

4. hlep with passing variables between scripts in Korn Shell

5. environment variables passing to another shell (script)

6. shell-script executes a perl-script???

7. PERL script vs SHELL script

8. Incomplete output from crontab email: running shell scripts from a perl script

9. can you translate shell script into perl script?


 
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software