in reply to Re: Re: Re: My first Perl script
in thread My first Perl script

Personally I would change

open(MYNEWFILE, ">>$my_new_log:") or die "$my_new_log open() failed: $!";
to
open(MYNEWFILE, ">>$my_new_log") or die "$my_new_log open() failed: $!";

But that just means that the output file won't have a colon on the end. The colon isn't a valid filename character for Windows (if I recall correctly) and has special meaning on Macs. Not sure if it's a problem for Linux, though. I'd just remove it to be safe(r).

Also note that the >> before the $my_new_log means "open for append". So if you run this script multiple times the same file will have the new results added at the end. So if you change the way the script works, make sure to look at the end of the file to see them. I've burned myself a few times on this -- wondering why my new changes weren't showing up in the results file... If you want to make a new output file every time (and overwrite the old one) you can change >> to >