Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > calling browser from perl command line program under windows xp

Reply
Thread Tools

calling browser from perl command line program under windows xp

 
 
Graham Smith
Guest
Posts: n/a
 
      07-17-2004
I am trying to call IE5 from a perl program running from command
prompt in windows XP using a http address:

system("start http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&category=14955&item=5708600 959");

The browser is called ok but the parameters (category and item) are
not passed correctly! The address that it calls is:

http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem

and the web page called complains understandably about invalid item!
I have searched and experimented for couple of hours can anyone help
please?
 
Reply With Quote
 
 
 
 
Matt Garrish
Guest
Posts: n/a
 
      07-17-2004

"Purl Gurl" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Christian Winter wrote:
>
> > Graham Smith wrote:

>
> (snipped)
>
> > > I am trying to call IE5 from a perl program running from command
> > > prompt in windows XP using a http address:

>
> > > ... ?ViewItem&category=14955&item=57086009 59");

>
> > > The browser is called ok but the parameters (category and item) are
> > > not passed correctly!

>
> > ...as the cmd shell parses the "&" signs as command separators

>
>
> Are you absolutely certain about that?
>


I thought you knew everything DOS? Seems your knowledge is lacking. &s need
to be escaped with a caret:

system("start
http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem^&category=14955^&item=57086 00959");

Matt


 
Reply With Quote
 
 
 
 
ChrisO
Guest
Posts: n/a
 
      07-18-2004
Graham Smith wrote:
> I am trying to call IE5 from a perl program running from command
> prompt in windows XP using a http address:
>
> system("start http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&category=14955&item=5708600 959");
>
> The browser is called ok but the parameters (category and item) are
> not passed correctly! The address that it calls is:
>
> http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem
>
> and the web page called complains understandably about invalid item!
> I have searched and experimented for couple of hours can anyone help
> please?


system(qq{start
"http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&category=14955&item=5708600 959"});

should also work in addition to the escape ^ you were already given.

-ceo
 
Reply With Quote
 
Graham Smith
Guest
Posts: n/a
 
      07-20-2004
ChrisO <(E-Mail Removed)> wrote in message news:<f6lKc.1263$(E-Mail Removed) m>...
> Graham Smith wrote:
> > I am trying to call IE5 from a perl program running from command
> > prompt in windows XP using a http address:
> >
> > system("start http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&category=14955&item=5708600 959");
> >
> > The browser is called ok but the parameters (category and item) are
> > not passed correctly! The address that it calls is:
> >
> > http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem
> >
> > and the web page called complains understandably about invalid item!
> > I have searched and experimented for couple of hours can anyone help
> > please?

>
> system(qq{start
> "http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&category=14955&item=5708600 959"});
>
> should also work in addition to the escape ^ you were already given.
>
> -ceo


thanks everyone, PurlGurl's escaping the ampersands with carets does
the trick although I particularly like the OLE solution which seems to
be a better general solution for me, that way I don't have to fiddle
around with the URL.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calling external program from browser with parameters - cross-browser Jeff ASP .Net 13 10-06-2007 08:03 AM
what's wrong calling a Perl/CGI script in Perl/CGI script under Tomcat server? kath Perl Misc 4 04-09-2007 09:21 PM
use one line Perl command to add a line at the begin of a file Ting Wang Perl Misc 3 12-13-2005 06:07 PM
Can I run perl under windows line by line? wld Perl Misc 4 02-12-2005 08:36 PM
Cannot execute command line program in cmd.exe under aspx form Yehuda Vernik ASP .Net Security 0 09-15-2004 07:41 PM



Advertisments