david wrote:
> Ramprasad A Padmanabhan wrote:
>
>
>>Hi All,
>> I have been using perl on linux for quiet some time now and I have
>>found that Perl does not work the same in windows
>>
>> eg. To get all the unique elements of an array in linux I use a
>>simple one liner
>>
>> @unique = grep{!/$seen{$_}++/} @all_elements;
>>
>>But this does not even pass syntax check on windows
>>Can Anyone tell me the best way how to get all the unique elements in an
>>array preserving the same order
>
>
> why not simply:
>
> @hash{@all_elements} = ();
>
> now "keys %hash" gives you the unique elements.
>
> david
>
Would these exist but be undef?
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]