Forum Moderators: phranque

Message Too Old, No Replies

sofware to randomly shuffle lines of text

         

knuyie

6:37 am on Aug 14, 2003 (gmt 0)



I've been searching for software to randomly shuffle the lines in a text file, specially email addresses, since I heard that having your subscriber list in alphabetically can make it flagged as spam by AOL. Since I'm going to clean my list, I will need to shuffle the email addresses randomly before readding the active subscribers into lyris.

If anyone can refer me to a free software that can do this to a file of at least 100,000 lines of email addresses, I'll be happy to send you $20 through Paypal as a thank you.

netcommr

6:53 am on Aug 14, 2003 (gmt 0)

10+ Year Member



You could try using the Perl %hash

%hashes are not usually put in the same order if the number of entries changes. simple way to mix things up. just add all entries to the hash and write them back out with a foreach(%hash) loop without any sorting.

Perl likes to fill the hash depending upon how efficiently the entries fit into memory, hence no real visible pattern.

just a simple solution that may solve your issue, if that helps send the 20 to WebmasterWorld

dmorison

7:06 am on Aug 14, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Shuffling 100,000 ain't gonna be trivial.

If you could split the file in 2 you could do it in Microsoft Excel in a roundabout sort of way.

Paste 50,000 odd entries into Column A.

Go to cell B1.

Enter the formula below:

=rand()

Select Column B (click the column header)

From the menu, go Edit > Fill > Down.

This will fill column B with random numbers.

Scroll to the bottom and clear out Column B below the last email address in Column A.

Select the sheet by clicking in the top left corner.

From the menu, go Data > Sort, and sort by Column B, ascending.

Finally copy / paste Column A out into a new text file.

You get the idea anyway....