Re: OT: perl function call from a bash script.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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'`


Attachment: pgpBy1oI4dzVv.pgp
Description: PGP signature


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux