in reply to Re: Re: Re: string occurences
in thread string occurences

The problem is that the program will then increment that default hash value of 1.

I don't see how that is a problem. Right now, this code:

$counts{$url}=0 if !defined $counts{$url}; $counts{$url}++;
Makes a new hash instance 0, than increments it; also incrementing each repeated instance. If you just take out that first line, the results are the same.

On a side note, exists probably would have been better, instead of defined. But mabey that's just me : )

The 15 year old, freshman programmer,
Stephen Rawls

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.