Perl: the Markov chain saw | |
PerlMonks |
How to ask user for file name and save the output to a new text fileby mmazlan67 (Novice) |
on Jun 19, 2017 at 03:36 UTC ( [id://1193076]=perlquestion: print w/replies, xml ) | Need Help?? |
mmazlan67 has asked for the wisdom of the Perl Monks concerning the following question: Hi, i am really new to Perl because before this i worked on Excel VBA. For now i have 3 different perl scripts in VNC that i plan to combine them into one. The first script will ask user for file name (e.g summary.txt), find the matching string in the summary.txt and saved the output in inout.txt using command on console "perl step1.pl summary.txt > inout.txt". But error will occur Then, i run the second script just to take all the necessary data based on the requirement and saved the output in result.txt using command on console "perl step2.pl inout.txt > result.txt. The third script will send result.txt to an email which can be viewed in Windows. I know that it is possible but i have no idea on how to do it as i got stuck on thinking how to open summary.txt file to read and open inout.txt to write at the same time. I add this code below in step1.pl but then i cannot run the script on console using "perl step1.pl summary.txt > inout.txt"
step1.pl
step2.pl
step3.pl
Back to
Seekers of Perl Wisdom
|
|