in reply to re-ordering lines of text in a file?
Hi moddingforfun,
PerlMonks is mostly a place to learn, and usually* not a code writing service (there are other websites where you can get Perl coders to write things for you for not too much money if you are so inclined).
* Sometimes, if you're lucky, some monks will help with working code. But you'll get much more help if you show your own efforts - of course we'd be happy to welcome another Perl coder here, so perhaps you should give perlintro another go :-) If you can write BASIC, that's a start - that's what I first started with many years ago, and if you know Bash, there are some similarities to Perl there. Try writing a few lines of code, we'll be happy to help.
Also, we can point you in the right direction. For example, in your question, you don't specify how this reordering is supposed to happen. Have a look at How do I post a question effectively?, at the very least you'd have to give some short sample input, describe how the reordering is supposed to happen, and show the corresponding expected output.
For listing the files in a directory, there's e.g. the glob function. For accessing and reordering the lines in each file, perhaps the module Tie::File can help - it provides mostly transparent access to the lines of a file via a Perl array.
Update 2016-11-30: I think I may have made it sound too much like you won't get any code here. Of course that's not the case, but as I said it's best if you first show your efforts (= good questions + your code) - at least those are my favorite questions and that's what often motivates me to want to help.
Hope this helps,
-- Hauke D
|
|---|