The standard way to check the structure of some arbitrary data in Perl is with Data::Dumper, Perl's defacto data serialization library.<br><br>Somewhere in your program 'use Data::Dumper;'... then later 'print Dumper( $ordertext );'.<br>
<br><br>Hope that helps.<br><br><br><div class="gmail_quote">On Tue, Nov 2, 2010 at 4:21 PM, Eric Ellington <span dir="ltr"><<a href="mailto:e.ellington@gmail.com">e.ellington@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
I do not know the answer to your question, but I have used<br>
WWW::Mechanize in the past witch much success. I know the maintainer<br>
monitors the Chicago PM boards, he is a nice guy and answers questions.<br>
<br>
<br>
Eric<br>
<div><div></div><div class="h5"><br>
<br>
<br>
On Mon, Nov 1, 2010 at 11:00 PM, John Warner <<a href="mailto:jwarner@texas.net">jwarner@texas.net</a>> wrote:<br>
> All,<br>
><br>
><br>
><br>
> It’s been a while since I did any Perl programming and I could use a<br>
> pointer. I work as a lab admin at Dell where one of my job duties is to<br>
> order equipment for the various teams I support. The process works like<br>
> this: we have the teams configure a system in a shopping cart at Dell.com<br>
> then submit the shopping cart to the lab admins. We, the lab admins, take<br>
> the information from the cart (quantity, SKUs, and descriptions), do a whole<br>
> bunch of manual manipulation and then paste the processed info into a tool<br>
> we use for internal ordering.<br>
><br>
><br>
><br>
> The problem:<br>
><br>
> I have been using Win32::Watir to interact with <a href="http://dell.com" target="_blank">dell.com</a> to navigate to the<br>
> SKUs in a shopping cart. I have thus far been unable to get data in a<br>
> format I can use from the shopping cart. I get some of the HTML but not the<br>
> stuff in the frame with the SKUs when I implement HTML::Parser start. I can<br>
> get the information I am after with the Parser text function but without any<br>
> kind of separation that I could write a useful regex to separate.<br>
><br>
><br>
><br>
> my $url =<br>
> “<a href="http://ecomm.dell.com/dellstore/basket_retrieve.aspx?c=us&cs=04&l=en&s=bsd&itemtype=CFG&cart_id=1013663916825&toEmail=john_warner@dell.com" target="_blank">http://ecomm.dell.com/dellstore/basket_retrieve.aspx?c=us&cs=04&l=en&s=bsd&itemtype=CFG&cart_id=1013663916825&toEmail=john_warner@dell.com</a>”;<br>
><br>
><br>
><br>
> my $ie = Win32::Watir->new( visible => 1, maximize => 0);<br>
><br>
> print "Pointing to IE to found URL\n";<br>
><br>
> $ie->goto($url);<br>
><br>
><br>
><br>
> print "Clicking \"Detail View\" link in basket\n";<br>
><br>
> $ie->getLink('linktext:', qr/Detail View/)->Click;<br>
><br>
><br>
><br>
> print "Showing details of cart\n";<br>
><br>
> $ie->getLink('linktext:', qr/Show Details/)->Click;<br>
><br>
><br>
><br>
> my $ordertext = $ie->text;<br>
><br>
> #my $ordertext = $ie->html;<br>
><br>
> print $ordertext;<br>
><br>
><br>
><br>
> #do useful processing here…<br>
><br>
><br>
><br>
> The crux of my problem (I think) is that I don’t know what type of data<br>
> (array, hash, etc) that $ie->html or $ie->text returns. Perhaps if I knew<br>
> that I could make headway on processing…<br>
><br>
><br>
><br>
> Thanks for your time!<br>
><br>
><br>
><br>
> John Warner<br>
><br>
> <a href="mailto:jwarner@texas.net">jwarner@texas.net</a><br>
><br>
> H: 512.251.1270<br>
><br>
> C: 512.426.3813<br>
><br>
><br>
><br>
</div></div>> _______________________________________________<br>
> Austin mailing list<br>
> <a href="mailto:Austin@pm.org">Austin@pm.org</a><br>
> <a href="http://mail.pm.org/mailman/listinfo/austin" target="_blank">http://mail.pm.org/mailman/listinfo/austin</a><br>
><br>
<font color="#888888"><br>
<br>
<br>
--<br>
Eric Ellington<br>
<a href="mailto:e.ellington@gmail.com">e.ellington@gmail.com</a><br>
_______________________________________________<br>
Austin mailing list<br>
<a href="mailto:Austin@pm.org">Austin@pm.org</a><br>
<a href="http://mail.pm.org/mailman/listinfo/austin" target="_blank">http://mail.pm.org/mailman/listinfo/austin</a><br>
</font></blockquote></div><br>