Shell script : #!/bin/bash test() { echo "test:Inside tests.sh..." } export -f test Perl Script : #!/usr/bin/perl -w use strict ; print "Test main \n" ; system (("/bin/bash", "test")) ;