- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: How to call a PERL subroutine from a C/C++ cod...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-25-2007 10:51 PM
тАО11-25-2007 10:51 PM
How to call a PERL subroutine from a C/C++ code
I have installed Active PERL-5.8.8 and i want to call a subroutine from a C/C++ Program.
For this what all i have to install (any special Libraries)
Can anyone help me out of this .
thanks and regards
Vikram
- Tags:
- Perl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-26-2007 12:16 AM
тАО11-26-2007 12:16 AM
Re: How to call a PERL subroutine from a C/C++ code
This should be the same as any external program call. No special libraries are needed. Depending upon what you want to achieve, you could simply use 'system()'. Of course, this runs the program defined by its argument and then returns control to the caller. You could also 'execl' the Perl code replacing your program with it. Otherwise, perhaps you want to 'fork()' the Perl program (script or module) as a child process of your C code. For inter-C/Perl communication look to a 'pipe'. Everything depends upon what you want to do and what control you need to have.
Regards!
...JRF...
- Tags:
- system
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-26-2007 12:46 AM
тАО11-26-2007 12:46 AM
Re: How to call a PERL subroutine from a C/C++ code
Thank you for the reply.
I want to parse a file so i am plaaning to use PERL script as it will be very easy to parse the file using PERL because buitin functions like split(), chomp() etc,
After parsing i want to store this contents in a hash table. From this i can continue the C++ module to work on the same hash table elements.
this is all i want to achieve.
Please let me know your inputs to this
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-26-2007 12:46 AM
тАО11-26-2007 12:46 AM
Re: How to call a PERL subroutine from a C/C++ code
Thank you for the reply.
I want to parse a file so i am plaaning to use PERL script as it will be very easy to parse the file using PERL because buitin functions like split(), chomp() etc,
After parsing i want to store this contents in a hash table. From this i can continue the C++ module to work on the same hash table elements.
this is all i want to achieve.
Please let me know your inputs to this
thanks and regards
Vikram
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-26-2007 12:48 AM
тАО11-26-2007 12:48 AM
Re: How to call a PERL subroutine from a C/C++ code
from a shell type "perldoc perlembed".
- Tags:
- perlembed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-26-2007 12:50 AM
тАО11-26-2007 12:50 AM
Re: How to call a PERL subroutine from a C/C++ code
if it's more than just a system() or execvp() syscall then
from a shell type "perldoc perlembed" and read.