calling browser from perl command line program under windows xp

Discussion in 'Perl Misc' started by Graham Smith, Jul 17, 2004.

  1. Graham Smith

    Graham Smith Guest

    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=5708600959");

    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?
    Graham Smith, Jul 17, 2004
    #1
    1. Advertising

  2. Graham Smith

    Matt Garrish Guest

    "Purl Gurl" <> wrote in message
    news:...
    > 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=5708600959");

    Matt
    Matt Garrish, Jul 17, 2004
    #2
    1. Advertising

  3. Graham Smith

    ChrisO Guest

    Re: calling browser from perl command line program under windowsxp

    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=5708600959");
    >
    > 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=5708600959"});

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

    -ceo
    ChrisO, Jul 18, 2004
    #3
  4. Graham Smith

    Graham Smith Guest

    ChrisO <> wrote in message news:<f6lKc.1263$>...
    > 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=5708600959");
    > >
    > > 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=5708600959"});
    >
    > 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.
    Graham Smith, Jul 20, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. calmar
    Replies:
    5
    Views:
    836
    Fredrik Lundh
    Feb 14, 2006
  2. Jeff
    Replies:
    13
    Views:
    1,135
    vanilla
    Oct 6, 2007
  3. Mark Sizzler
    Replies:
    11
    Views:
    2,921
    Jan Thomä
    Feb 18, 2009
  4. Yehuda Vernik
    Replies:
    0
    Views:
    165
    Yehuda Vernik
    Sep 15, 2004
  5. wld
    Replies:
    4
    Views:
    152
    Jazeker
    Feb 12, 2005
Loading...

Share This Page