I am trying to embed Java code in a perl script using the Inline .
But when i run the script no output is shown . It seems that the script is hung since I don’t even get back the command prompt.
#!/usr/bin/perl
use strict; use warnings;
use Inline Java => <<’EOJ’;
public class Hi {
String greeting;
public Hi(String greeting) {
this.greeting = greeting;
}
public void setGreeting(String newGreeting) {
greeting = newGreeting;
}
public String getGreeting() {
return greeting;
}
}
EOJ
my $greeter = Hi->new("howdy");
print $greeter->getGreeting(), "\n";












