Newsgroups: comp.lang.perl.misc
From: cha...@lonemerchant.com
Date: Thu, 15 May 2008 14:32:50 -0700 (PDT)
Local: Thurs, May 15 2008 5:32 pm
Subject: Re: Need ideas on how to make this code faster than a speeding turtle
On May 15, 2:21 pm, cha...@lonemerchant.com wrote:
> On May 15, 1:37 pm, Uri Guttman <u...@stemsystems.com> wrote: Maybe something like this? > > >>>>> "c" == chadda <cha...@lonemerchant.com> writes: > > i have to know if you could write this mess any slower? you are doing > I know I shouldn't critize free help, but you seem to have some anger > > c> open(IN, '<', 'input') || die "cant open: $!"; > > why are you calling out to a program when perl can load web pages just > Would using LWP speed up the code? By the way, this code is meant to > > c> open(OUTFILE, '>out'); > > c> open(OUT, '<', 'out') || die "cant open: $!"; > > why are you writing out the output of lynx JUST TO READ IT BACK IN > > you have the text in $temp. you know how to use backticks but why do you > > also calling it @shit is not a good thing. > Huh? Are you saying I don't need the 'out' file? % more parse.pl #!/usr/bin/perl -w my (@shit, $read, $build, @product, @id, @sku, @upc, @weight); open(IN, '<', 'input') || die "cant open: $!"; @product = grep(/Product ID/, @temp); print @product; However, I don't know how to use LWP. Again, would the code run faster You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||