in reply to Path::Tiny paths require defined, positive-length parts

Line 30 reads sub append_today {. Please post the code that you actually are running when you get the error.

Nota Bene:

Main( @ARGV ); Main( "C:\\TEMP\\DAILY.csv", "C:\\TEMP\\MONTHLY.csv" );
Does not do what you probably think it does. See the documentation on subroutine prototypes.

UPDATE

After your update to your code, line 30 is now  my $fh = path( $infile )->openr_raw;. Much more reasonable.

So, why is $infile empty? You might try printing @_ before and after line 18, and before line 28. Or just fire up the Perl Debugger (perl -d insert_my_code_here) and step through the code.

UPDATE^2

Stepping through the code with the debugger is most enlightening. You call the main() routine twice. What happens if there are no command-line arguments?

----
I Go Back to Sleep, Now.

OGB