in reply to Pipeing to a java input.

Look at the various IPC modules (Inter Process Communication) . You can try this simple example, but various glitches can occur like needing a pty or something. You should try to run your java program instead of bash, and see what happens.
#!/usr/bin/perl use warnings; use strict; use IPC::Open3; $|=1; #my $pid=open3(\*IN,\*OUT,\*ERR,'/bin/bash'); # or your java program my $pid=open3(\*IN,\*OUT,0,'/bin/bash'); # set \*ERR to 0 to send STDERR to STDOUT my $cmd = 'date'; #send cmd to bash print IN "$cmd\n"; # assuming your program understands it print IN "l"; print IN "m"; print IN "t"; print IN "\n"; #getresult my $result = <OUT>; print $result;

I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh