Price comparison-agent

2009-06-15 Thread Mimi Cafe
Sorry if you have received multiple copies of this e-mail. I am trying to write a small online price comparison-agent, but I have no experience doing something similar before. My intention is to query search engines for a product and try to my own algorithm to parse the returned values for

Price comparison-agent

2009-06-15 Thread Mimi Cafe
I am trying to write a small online price comparison-agent, but I have no experience doing something similar before. My intention is to query search engines for a product and try to my own algorithm to parse the returned values for the prices and compare them. Can any experienced developer tell

Re: Request for code feedback

2009-06-15 Thread Steve Bertrand
Steve Bertrand wrote: Hi all, I'm still in the process of updating/replacing some accounting applications, and thought I'd ask for a peer review. ... Thank you all for all of the wonderful detailed and descriptive feedback. I now have a good deal of information to go over. A couple of

Price comparison-agent

2009-06-15 Thread Mimi Cafe
I am trying to write a small online price comparison-agent, but I have no experience doing something similar before. My intention is to query search engines for a product and try to my own algorithm to parse the returned values for the prices and compare them. Can any experienced

RE: Request for code feedback

2009-06-15 Thread Bob McConnell
From: Chap Harrison On Jun 13, 2009, at 4:07 PM, David Christensen wrote: Chas. Owens wrote: the only True Way is to use tabs for indent levels and spaces for alignment, this allows the user to set his or her indentation to whatever he or she wants by modifying how many spaces a tab

perl or awk??? ... that is the question ...

2009-06-15 Thread Aimee Cardenas
Hi, All! I have a file with two important columns in it separated by spaces. I'll call these col1 and col2. I need to sort the data by col2 and then print col1 col2 to a file. I know I CAN do it with perl, but which way is faster for this kind of processing? Perl or Awk? I know

Re: perl or awk??? ... that is the question ...

2009-06-15 Thread Chas. Owens
On Mon, Jun 15, 2009 at 11:28, Aimee Cardenasaim...@sfbrgenetics.org wrote: Hi, All! I have a file with two important columns in it separated by spaces.  I'll call these col1 and col2.  I need to sort the data by col2 and then print col1 col2 to a file.  I know I CAN do it with perl, but

Re: perl or awk??? ... that is the question ...

2009-06-15 Thread John W. Krahn
Aimee Cardenas wrote: Hi, All! Hello, I have a file with two important columns in it separated by spaces. I'll call these col1 and col2. I need to sort the data by col2 and then print col1 col2 to a file. I know I CAN do it with perl, but which way is faster for this kind of

Re: perl or awk??? ... that is the question ...

2009-06-15 Thread Aimee Cardenas
Why just limit yourself to AWK or Perl? What about cut(1), join(1), sort(1), etc.? These are good options as well. I'm just comparing the capabilities and perl and awk on this matter because a colleague of mine is a die- hard Awker and I myself have an affinity for Perl. Curiosity

Re: perl or awk??? ... that is the question ...

2009-06-15 Thread John W. Krahn
Chas. Owens wrote: On Mon, Jun 15, 2009 at 11:28, Aimee Cardenasaim...@sfbrgenetics.org wrote: I have a file with two important columns in it separated by spaces. I'll call these col1 and col2. I need to sort the data by col2 and then print col1 col2 to a file. I know I CAN do it with

Re: perl or awk??? ... that is the question ...

2009-06-15 Thread John W. Krahn
Aimee Cardenas wrote: Why just limit yourself to AWK or Perl? What about cut(1), join(1), sort(1), etc.? These are good options as well. I'm just comparing the capabilities and perl and awk on this matter because a colleague of mine is a die-hard Awker and I myself have an affinity for

Re: perl or awk??? ... that is the question ...

2009-06-15 Thread Paul Johnson
On Mon, Jun 15, 2009 at 11:49:41AM -0400, Chas. Owens wrote: On Mon, Jun 15, 2009 at 11:28, Aimee Cardenasaim...@sfbrgenetics.org wrote: Hi, All! I have a file with two important columns in it separated by spaces.  I'll call these col1 and col2.  I need to sort the data by col2 and then

Re: perl or awk??? ... that is the question ...

2009-06-15 Thread Aimee Cardenas
Awesome idea! I might do that! :-D Aimee Mostella Cardenas Department of Genetics Southwest Foundation for Biomedical Research 7620 NW Loop 410 San Antonio, TX 78245 Phone: (210) 258-9884 aim...@sfbrgenetics.org On Jun 15, 2009, at 11:18 AM,

Re: perl or awk??? ... that is the question ...

2009-06-15 Thread Chas. Owens
On Mon, Jun 15, 2009 at 12:15, John W. Krahnjwkr...@shaw.ca wrote: snip The OP said they want to sort by col2 so that should be sort { $a-[1] cmp $b-[1] } snip Yeah, I didn't read closely enough. snip Or perhaps a GRT instead: perl -le'print for map join( , reverse /(\S+)(\s+)(\S+)/ ), sort

Re: perl or awk??? ... that is the question ...

2009-06-15 Thread Aimee Cardenas
snip Or perhaps a GRT instead: perl -le'print for map join( , reverse /(\S+)(\s+)(\S+)/ ), sort map join( , reverse /(\S+)(\s+)(\S+)/ ), ' filename snip For those not familiar with the Guttman Rosler Transform (GRT for short), here is an article on it:

Re: perl or awk??? ... that is the question ...

2009-06-15 Thread John W. Krahn
Chas. Owens wrote: On Mon, Jun 15, 2009 at 12:15, John W. Krahnjwkr...@shaw.ca wrote: snip The OP said they want to sort by col2 so that should be sort { $a-[1] cmp $b-[1] } snip Yeah, I didn't read closely enough. snip Or perhaps a GRT instead: perl -le'print for map join( , reverse

Inconsistent results from keys %hash

2009-06-15 Thread Chap Harrison
Hi, I was trying to find out why $input_field{$colname} wasn't returning anything when $colname = Attendance_Comment, and discovered this odd behavior: DB41 p join /, keys %input_field /Attendance_Code/SchoolID/Att_Date/Student_Number DB42 p join \n, keys %input_field Attendance_Comment

Re: Inconsistent results from keys %hash

2009-06-15 Thread Chas. Owens
On Mon, Jun 15, 2009 at 13:25, Chap Harrisonc...@pobox.com wrote: Hi, I was trying to find out why $input_field{$colname} wasn't returning anything when $colname = Attendance_Comment, and discovered this odd behavior:  DB41 p join /, keys %input_field

Re: Inconsistent results from keys %hash

2009-06-15 Thread John W. Krahn
Chap Harrison wrote: Hi, I was trying to find out why $input_field{$colname} wasn't returning anything when $colname = Attendance_Comment, and discovered this odd behavior: DB41 p join /, keys %input_field /Attendance_Code/SchoolID/Att_Date/Student_Number DB42 p join \n, keys

Re: Inconsistent results from keys %hash

2009-06-15 Thread Chap Harrison
Wow - okay, I guess it all makes sense now. Input was from DOS file, and I hadn't set $/ ! So the unchomped \x0d was remaining with the final field and making havoc, esp. with printing. But if you're interested: Here is snippet of code that builds the @colnames array, reads input, and

Alpaca Chap7 Question

2009-06-15 Thread Thomas H. George
I do not fully understand the solution to the problem, p77-78 237. First, the declaration of the array my @files in the subroutine gather_mtime_between will be read every time find($gather, $starting_directories) calls the subroutine. I take it the repeated declarations have no effect and since

Re: Alpaca Chap7 Question

2009-06-15 Thread Jim Gibson
On 6/15/09 Mon Jun 15, 2009 12:26 PM, Thomas H. George li...@tomgeorge.info scribbled: I do not fully understand the solution to the problem, p77-78 237. First, the declaration of the array my @files in the subroutine gather_mtime_between will be read every time find($gather,

Re: perl or awk??? ... that is the question ...

2009-06-15 Thread Uri Guttman
JWK == John W Krahn jwkr...@shaw.ca writes: JWK Chas. Owens wrote: For those not familiar with the Guttman Rosler Transform (GRT for short), here is an article on it: http://www.perlmonks.org/?node_id=145659 JWK Or read the original paper at: JWK

Re: Price comparison-agent

2009-06-15 Thread dan
On Mon, 15 Jun 2009 14:10:14 +0100, Mimi Cafe mimic...@googlemail.com wrote: I am trying to write a small online price comparison-agent, but I have no experience doing something similar before. My intention is to query search engines for a product and try to my own algorithm to parse the