in reply to Path::Tiny paths require defined, positive-length parts
Nota Bene:
Does not do what you probably think it does. See the documentation on subroutine prototypes.Main( @ARGV ); Main( "C:\\TEMP\\DAILY.csv", "C:\\TEMP\\MONTHLY.csv" );
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
|
|---|