Guest_imported
New member
- Jan 1, 1970
- 0
Hi all.
I'm stuck in my perl script.
This is my problem:
I want to open up a plain-text file, the file looks like this
1.word1
2.word2
3.word3
4.word4
5.word5
6.word6
and so on...until row 50
I want to open this file and take 4 rows in a random way AND I always want line 5.
So my output shold look like
2.word2
4.word4
5.word5 (this one must always be included)
9.word9
Now I want to make randomise the output so it will look like this
4.word4
5.word5
9.word9
2.word2
I know,this is not easy but I can't solve this one without any help
A BIG thanks to everyone
/PP
Does anyone knows how to do this ?
I'm stuck in my perl script.
This is my problem:
I want to open up a plain-text file, the file looks like this
1.word1
2.word2
3.word3
4.word4
5.word5
6.word6
and so on...until row 50
I want to open this file and take 4 rows in a random way AND I always want line 5.
So my output shold look like
2.word2
4.word4
5.word5 (this one must always be included)
9.word9
Now I want to make randomise the output so it will look like this
4.word4
5.word5
9.word9
2.word2
I know,this is not easy but I can't solve this one without any help
A BIG thanks to everyone
/PP
Does anyone knows how to do this ?