Hi,
Im using the perl modules in php, I have installed the perl interpreter, its working fine. I dont ho how to include perl modules in php and pass the values and fetch the data. I was trying with this code but got "Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /var/www/mohan/adduseraction.php on line 27", Can any1 help me to solve this issue??
<?php
echo "hello";
$perl=new Perl();
$perl->eval('
package Kernel::System::CustomerUser;
sub CustomerSearch {
my ( $Self, %Param ) = @_;
# remove leading and ending spaces
if ( $Param{Search} ) {
$Param{Search} =~ s/^\s+//;
$Param{Search} =~ s/\s+$//;
}
my %Data = ();
for ( '', 1 .. 10 ) {
# next if customer backend is used
next if !$Self->{"CustomerUser$_"};
# get customer search result of backend and merge it
my %SubData = $Self->{"CustomerUser$_"}->CustomerSearch(%Param);
%Data = ( %SubData, %Data );
}
return %Data;
}'
);
print $perl;
//$p=new Perl(CustomerUser);
echo "hello";
?>