OT: perl function call from a bash script.

Sam Varshavchik mrsam at courier-mta.com
Mon Oct 1 11:09:37 UTC 2007


Strong writes:

> I have an application that formerly was written in bash but latter got
> many scripts being written both in bash and perl. Now I want to use a
> function that is contained in a perl-script - that is used by other
> perl scripts using 'require' - from a bash script. I need to call it
> passing a string to it and get the result from it (a string also).
> 
> I've looked through several bash guides but did not find a solution.
> So, my question is, How to do that?

foo=`perl -e 'require <whatever>; print $result'`


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20071001/87492860/attachment-0001.sig>


More information about the fedora-list mailing list