I am trying to invoke a perl script from slickedit..through a .e file which i will use to create a macro.The perl script basically is a xml parser which parses a .xml file whose structure is defined according to a .dtd file.
here goes the .e file i am using for invoking the perl script
_command void invoke(){
shell("C:\\Users\\anits\\Desktop\\trial.pl");
}
the perl script which is to be invoked looks like this
use XML::Simple;
use Data::Dumper;
open logfile,">test.txt";
#sub process{
$xml = new XML::Simple (KeyAttr=>[]);# read XML file
my $error =$xml->XMLin("trial.xml");
print "There are " . scalar(@{$error->{problem}}) . " problems.\n";
foreach my $var (@{$error->{problem}}) {
print logfile $var->{name}."\n";
}
close logfile;
@args = ("C:/Program Files (x86)/SlickEdit 2009/win/vs.exe","C:/Users/anits/Desktop/test.txt");
system(@args) == 0 or die "system @args failed: $?";
As you can see my perl script should open a txt file back in slickedit..but i dont get any output.So please help me on that.
If the xml parsing can be done using slickc please suggest a way to do it. Thanks and i hope my question is clear now