in reply to RE: Re: All array elements the same?
in thread All array elements the same?
Then, if there is only one key, all the values must have been identical.
@check{@arr} is the "keys" part of the slice, and @arr x 1 just gives us the correct number of "values."
Voila! A list of the unique elements of @arr (in keys %check). If there is only one unique element, then they are all the same. Two problems solved for the price (two lines, in this case) of one. :-)
Russ
Brainbench 'Most Valuable Professional' for Perl
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: RE:(3) All array elements the same? (Code explained)
by jjhorner (Hermit) on Aug 01, 2000 at 20:38 UTC |