No such thing as a small change | |
PerlMonks |
Re: Path::Tiny paths require defined, positive-length partsby Old_Gray_Bear (Bishop) |
on Jun 19, 2014 at 01:49 UTC ( [id://1090376]=note: print w/replies, xml ) | Need Help?? |
Line 30 reads sub append_today {.
Please post the code that you actually are running when you get the error.
Nota Bene: 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?
---- OGB
In Section
Seekers of Perl Wisdom
|
|