in reply to Difference btw. abs_path and $0?

returns the whole thing and not /long/path/to/some/ as I expected

If you read Cwd you can learn why you expect the wrong thing