Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
How to call a external subroutine?
vipulk
Hi,
I have to call a external subroutine in my presentation template. I am new to Interwoven and wants to know the way and syntax,how to do it. Please help me.
Find more posts tagged with
Comments
rahulkulkarni
Hi Vipul,
This is answer to your question :
Subroutines in PERL is just like standard Functions and they act the same . To call external files with Perl subroutines use : require "full path of perl file";
eg:-
#!/usr/bin/perl -w
$last = "SAMMY";
$ph = "12466";
require "show.pl"; ## This is the external subroutine file.
&test($last,$ph); ## This is the subroutine name;
we pass two arguments or parameters to it.
## This is the subroutine inside "show.pl sub test
{
print "Last name is :$_[0] Phone is :$_[1]";
}
1;
Hope this will work fine for you.....
Regards
Rahul kulkarni.
vipulk
Hey Rahul,
Thanks a lot. It really solved my problem. Thanks again.