Help for this page

Select Code to Download


  1. or download this
    for (
       [qw(a a b c)],
    ...
    ) {
       print(uinq(@$_), "\n");    # Can't coerce array into hash
    }
    
  2. or download this
    for ('a a b c', 'd e e f') {
       print(uinq(split), "\n");  # Can't use string ("a a b c") as a HASH
    + ref while "strict refs" in use
    }
    
  3. or download this
    do { local %_; @_{@_}=(); keys %_ }
    
  4. or download this
    sub uinq { local %_; @_{@_}=(); keys %_ }