ActiveXComponent sc = new ActiveXComponent("ScriptControl"); sc.setProperty("language", new Variant("PerlScript")); |
// Construct an array with arguments to AddCode() Variant[] add_args = new Variant[1]; add_args[0] = new Variant("use LWP::Simple;"); |
Variant html = sc.invoke("AddCode", add_args); |
// Construct an array with arguments to Run() Variant[] get_args = new Variant[2]; get_args[0] = new Variant("get"); get_args[1] = new Variant("http://localhost/PerlInside/README"); |
Variant text = sc.invoke("Run", get_args); |
System.out.println(text); |
Forward to Perl Resources
Back to MS Java/Script Control Up to PerlInside section index Up to Perl Inside course index |
Perl Inside: PerlInside - 45
Copyright © 1999, Brian Jepson
|