> 
> (1) use string length (number of characters a string holds):
> 
> $length = length($name);
> 

I'd stay away from this as it will eventually let you down. For example:

my $str1 = 'I'd stay away from this as it will eventually let you down.'
my $str2 = 'My Mom will not stop looking at Internet porn for a second.'

Same length, two *very* different meanings. (BTW, this is not true :-)


> (2) compare strings (or 200-characer substrings thereof) directly:
> 
> if ( $str1 eq $str2 )
> {
>     ....
> }
> 


If you can be certain that a particular chunk would *always* be unique
between records, you could use the substring method. In which case, I'd be
inclined to stick 'em in a hash rather than compare each pair-combination.
Otherwise it might be best to compare the full string.  But, as David
suggested, Benchmark will tell which way to go.
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to