ive a perl script, where it has a subroutine clear() in it, and i've one shell script which runs in background, from that shell script i wanted to call subroutine which is in perl script, that's perl script is not module, just simple script.
Eg:
perl script <test>
#! /usr/bin/perl
some code goes here ......
sub clear()
{
some stuff ...
}
bash script <shell.sh>
#!/bin/sh
-- some stuff here --
if [ "$FSIZE" -ge "$SIZE" ] ; then
< i need to call subroutine which is defined in perl script < test> >
fi
i tried using perl -m<module> . as my perl is not a module, it didnt work.
Hi getmmg,
No i don't want to write new Perl script, as the script has clear subroutine, i wanted to use the existing Perl script subroutine <test>, from bash <shell.sh>. As shell script will call if that condition satisfies. please help with this existing perl script only.
Thanks.