Keep It Simple, Stupid | |
PerlMonks |
arrays of arraysby monkantar (Initiate) |
on Sep 07, 2007 at 13:12 UTC ( [id://637646]=perlquestion: print w/replies, xml ) | Need Help?? |
monkantar has asked for the wisdom of the Perl Monks concerning the following question:
Hello,
I am a starter in PERL and new to this website. For linguistic research, I should convert textcorpora with data such as: into: I thought writing a script for this function would be a piece of cake, but that wasn't the case...
I wrote a simple toy program with words and numbers to start :
the output is: input.txt consists of following textline: book 1 pencil 2 desk 3 the perlscript: This program works only for one line of text. For the moment I am reading about arrays of arrays as I want the program to work for each line in a text and push the selected items at the end of each line but I don't know if this approach will work. Does someone knows... or has written similar programs and can give me some advice for writing such a PERL script? Thanks a lot! Best regards Monkantar
Back to
Seekers of Perl Wisdom
|
|