How can I make Perl recognize paths with '~'?
问题 Possible Duplicate: How do I find a user's home directory in Perl? I'm running Ubuntu. Whenever I pass a Perl script a path that starts with ~ (e.g. ~/Documents/file.txt ) it fails finding it. I must pass the canonical path (e.g. /home/dave/Documents/file.txt ). Why is that? Can I make Perl recognize ~ paths? UPDATE All the suggested solutions include changing the code in the scripts. I would like for a solution that would not involve any changes to the scripts themselves (since not all of