in reply to Re^2: Saving my output to a folder
in thread Saving my output to a folder

If you will be running this script multiple times, each run will overwrite the previously saved ppid.

If you want to preserve/append to the PPID instead, use this construct to open the file in "append" mode:

open my $wfh, '>>', "$dir/$outfile" or die "ERROR: Can't open/append the damned output file! The OS says +:$!";

        This is not an optical illusion, it just looks like one.

Replies are listed 'Best First'.
Re^4: Saving my output to a folder
by LastGen Monk (Novice) on Apr 20, 2016 at 11:31 UTC
    Thanks, If I want to add every new scanned PPID as a new text file in that folder what should I do? Like having a list of text files in the destination folder. I will really appreciate any help.
      Yes - this is trivial:
      open my $wfh, '>', "$dir/$input" or die "can't open the damned output file! $!";

              This is not an optical illusion, it just looks like one.

        Thank you so much. It does exactly what I wanted. Appreciate it.