Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Sorting a file and printing it back onto itself

by kwoff (Friar)
on Nov 18, 2001 at 04:53 UTC ( #126066=note: print w/replies, xml ) Need Help??


in reply to Sorting a file and printing it back onto itself

One-liner :)
$ perl -i.bak -0777pe'$_=join"\n",sort(split /\n/),""' users.dat $ cat users.dat.bak me you them she he it we $cat users.dat he it me she them we you

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2022-05-25 20:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (90 votes). Check out past polls.

    Notices?