Hi,
        I tried something like this :

        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")) ; 

        Its throwing this error :
        Test main
        /usr/bin/test: /usr/bin/test: cannot execute binary file

        
Regards,
Alok.

-----Original Message-----
From: Nath, Alok (STSD) 
Sent: Tuesday, April 03, 2007 10:33 AM
To: beginners@perl.org
Subject: Calling bash things inside perl script.

Hi,
        Before starting my problem I just want to thank all the active
members
        who had literally mentored me in learning perl.

        I have bunch of this bash scripts which has lot of functions.
        I wanted to call and use them in a perl script.I am not sure how
        to do this.I did a cpan search but did not find anything
helpful.

        Any idea how to do this ?

Thanks
Alok.

--
To unsubscribe, e-mail: [EMAIL PROTECTED] For additional
commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to