in reply to Saving my output to a folder

This part,
my $output = <STDOUT>; print STDOUT "$input";
is not right. You are trying to read from the output! And print goes by default to STDOUT which in this case is the terminal.

You need to open a file handle for output like this:

open OUT, '>', 'c:/users/lastgen/docs/saved_ppid' or die "unable to open out file $!"; print OUT "something";
Note that I used "forward slash" instead of "back slash" in the path name. This is completely fine on Windows and will save yourself a lot of pain because "\" means something very special in Perl.

Update: If c:/users/lastgen/docs/saved_ppid is a directory then of course you need a target file like: c:/users/lastgen/docs/saved_ppid/ppid.txt. I see stevieb posted while I was typing. That code shows the preferred way for a file handle, using a lexical variable ($wfh) instead of what I did, a bare word (OUT). I did it that way because it might be easier for you to get started with and look at bit more obvious.

Replies are listed 'Best First'.
Re^2: Saving my output to a folder
by LastGen Monk (Novice) on Apr 19, 2016 at 20:11 UTC
    Marshall, Thank you too. I am glad we have great people like you guys on this site. Blessed be you all. Thanks a million times to all of you.
      I wish you well on your Perl journey! You did a bunch of stuff right including: a) asking a clear question, b)showing some code that shows that you are making an attempt. Whether or not your code works is not that important. I mean you wouldn't be asking for help if everything worked. Right? My theory is that there is a finite "quanta" of information that can be transferred and absorbed in one thread. I think we are there. Go forth and write more code!