Suja Emmanuel wrote: > Hi Rob, > > Thanks for you logic. I will explain what I am doing and what I > expect. > I have written a code to hit a particular URL from my code and > the code will return the rawdata. Now the rawdata itself is an XML file > and I want to optn the XML file in internet explorer. > > > The script which I am using is: > require LWP::UserAgent; > > > my $ua = LWP::UserAgent->new; > $ua->timeout(10); > $ua->env_proxy; > open (FH,">d:\\print.xml"); > > > my $response = > $ua->get('http://seraja.com/EventManager.do?func=getEventDetails&session > ID=FA8169578A1FACFBCEBDC6DD5850C1A5&eventID=70280'); > > > if ($response->is_success) > { > my $raw_data = $response->content; # or whatever > $/ = undef; > # my $raw_data = $content; > > > $raw_data =~ s/&/&/g; > > $raw_data =~ s/\s+/ /g; > print FH $raw_data; > > } > else { > die $response->status_line; > } > > When I execute the above code it creates an xml file in the given > location and we need to manually open the file to view. I want to view > the xml file in IE immediately after executing the code. > > I am using Windows system. > > Plese help me solving this issue, it's very urgent.
Hi Suja Just system('D:\print.xml'); will open the file with whatever application is set up to handle files with a .xml extension. In most cases that's Internet Explorer. If not then we need to find you a better solution so do let us know. HTH, Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>