As a new user of Perl, you'll want to look up the documentation for each part of the task; the Anonymous Monk gave you links to some of the commands you'll need; each of those documents includes code snippets that show how to use them. If I were you, I would make a programming-language-agnostic outline of what needs to be done ("open input file, open output file, read input file one line at a time, for each line do something including writing to the output file"). Then delve into the documentation to try to figure it out what commands you need to perform those tasks. The perlintro that AM linked should help you with your question of how to get something into a variable. Once you've got example code, if it doesn't work, post a SSCCE which shows your code, a simple input file (smaller is better, as long as it's sufficient to show the problem), an example of what you'd like the output file to look like, and let us know what's going wrong and/or what errors you are seeing.
In reply to Re: how to read variables from a file and write to a new file?
by pryrt
in thread how to read variables from a file and write to a new file?
by taha95
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |