Re: reading a file

2006-10-19 Thread Gerald Host
date your address book and distribution lists accordingly. Thank you. -Original Message- From: Gerald Host [mailto:[EMAIL PROTECTED] Sent: Thursday, October 19, 2006 3:35 PM To: Perl List Subject: reading a file I'm trying to read a text file line-by-line. open IN, shift

reading a file

2006-10-19 Thread Gerald Host
I'm trying to read a text file line-by-line. open IN, shift; my @lines=split("\n",); foreach my $line (@lines) { print OUT "QQQ $line QQQ\n"; } The problem is that it always gives me th

Re: hash slices

2006-09-28 Thread Gerald Host
Ryan/Gerald (!) (Ryan) You don't want to use selectall_hashref because, as is the nature of hashes, the key must be unique, which means the database table's key field that provides it must also be unique. If you get this working, you will retrieve a single record for each possible value of

hash slices

2006-09-28 Thread Gerald Host
I'm using DBI's selectall_hashref with 5 key columns. I want to display each row where key col 1 is 'yes' or NULL (undef or '' ?) foreach my $medCategory (keys %{$href->{'yes'}->{qw('' 'yes')}->{qw('' 'yes')}}) { foreach my $med (keys %{$href->{

Re: Calculation distances

2006-08-20 Thread Gerald Host
1. use one of the geocoding modules to get the latitude and longitude of the company addresses. 2. use the same module to get the address in the search box 3. find the difference (you'll want to use ABS in the SQL for absolute values because of negative numbers) 4. convert the difference to miles

Re: shifting 100 at a time

2006-08-20 Thread Gerald Host
Yes! I just wasn't sure if I'd get undefs in my array or not (I don't). Thanks! On 8/20/06, Tom Phoenix <[EMAIL PROTECTED]> wrote: On 8/20/06, Gerald Host <[EMAIL PROTECTED]> wrote: > No. I want the most efficient way to do this: > my @array0=(0..1

Re: shifting 100 at a time

2006-08-20 Thread Gerald Host
(assuming a loop is even used.) Thanks! On 8/20/06, Xavier Mas i Ramón <[EMAIL PROTECTED]> wrote: A Diumenge 20 Agost 2006 22:49, Gerald Host va escriure: > What is the most efficient way to shift the first 100 items off an array? > > Thanks! if you mean that first element be t

shifting 100 at a time

2006-08-20 Thread Gerald Host
What is the most efficient way to shift the first 100 items off an array? Thanks!