We don't bite newbies here... much | |
PerlMonks |
RE: All array elements the same?by Nitsuj (Hermit) |
on Aug 01, 2000 at 21:12 UTC ( [id://25504]=note: print w/replies, xml ) | Need Help?? |
Yes there is!
Make a scalar of size equal to the array, give it a value that is the same, do a comparison. If you take a look at the processes, this is actually a pretty quick way for many numbers :-) This is ESPECIALLY true for numbers such as 0. This is also true for certain types of numbers. Think like this.
Now all you have to do is a comparative operation. Much more can be extracted. By telling a range of difference, you can figure out which characters are different, like say that it is less than 256 off, you know that the first byte is different! COOL, HUH? "We're all different!" "I'm not" -The Life of Brian
In Section
Seekers of Perl Wisdom
|
|