Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Re: Sorting Unique File Entries

by l3nz (Friar)
on Nov 24, 2003 at 17:42 UTC ( [id://309603]=note: print w/replies, xml ) Need Help??


in reply to Re: Sorting Unique File Entries
in thread Sorting Unique File Entries

This is a somehow shorter version using the same technique but no named temporary array (it's more an exercise in concision than actually useful).
use strict; foreach my $d (sort keys %{{ map( ($_ => 1), <DATA>) }} ) { print $d; } __DATA__ a B a B dd
I wonder if there's a cleaner way to write the mapped expression.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://309603]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (9)
As of 2024-04-23 09:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found