I am rather new to perl and so far only used it in the cmd and to read/write .txt files.
What I am trying to do, is to run a program and give it inputs. I tried:
use IPC::Run qw(run);
my $in = 'test text\n';
run ['C:\WINDOWS\system32\notepad.exe'], $in;
So I am trying to open notepad just to test it. It is in fact opening, but I want the perl code to write into the text box (I do not want to write a file and open it then). The perl code is also pausing until I close the window, so 'run()' is probably not the right function. 'system()' doesn't seem to be much better...
Also, how do I do other things like save a file after I wrote it the way noted above? 'Ctrl + S' won't work.
Just as a clarification, writing a file in notepad is just a test. My goal is not to write a file. I do know how to do that.
Thanks in advance!