in reply to $0 inconsistency?

It's exactly what you ran, which depends on your current working directory.

d:\tmp>echo print $0 > test.pl d:\tmp>perl test.pl test.pl d:\tmp>cd .. d:\>perl tmp/test.pl tmp/test.pl d:\>perl tmp\test.pl tmp\test.pl d:\>perl tmp/../tmp\test.pl tmp/../tmp\test.pl d:\>

update

it's verbatim what was called, even the slashes are not normalized on windows.

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

Replies are listed 'Best First'.
Re^2: $0 consistent!
by misterperl (Friar) on Apr 13, 2022 at 14:13 UTC
    OK so when I call it I use perl -wd myscript.pl $0 has no path, and when the crontab calls it, its the full path..

    Rolf- you are BRILL! TY the world makes sense again..