Home: Need a Custom or Prewritten Perl Program?: I need a program that...:
need to pass null in java from perl



suman3010
New User

Aug 18, 2009, 3:48 AM


Views: 3598
need to pass null in java from perl

Java code is like

while ((line = reader.readLine()) != null) {...}

and we are calling this java from perl like....

$cmdToExec =$perlBin.'\\perl '.$scriptsDir.'/emx/microsoft_sqlserver_database/childperl.pl';
my $childpid = open3( *CHILD_IN, *CHILD_OUT, *CHILD_ERR, $cmdToExec);
print CHILD_IN @javacreds;
close CHILD_IN;

content of childperl.pl is

@out=`$cmdToExec`;
print @out;

So we need to pass the null from perl to java through @javacreds to break the while condition in java.