If I am calling the script from far away (for example in windows: C:\perl\bin\eraseme.pl) , then $0 has also the path attached to the name... ($0 eq 'C:\perl\bin\eraseme.pl'). So, it would not work as expected.
I should first, get rid of the path...
UPDATE: see a better way with liverpole's comment.$0=~s/^.*[\\\/]//;
In reply to Re: Interesting line which I read from Monk's snippets
by chanio
in thread Interesting line which I read from Monk's snippets
by jesuashok
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |