Of course my previous post may be irrelevant, as Joost points out, Perl doesn't expand ~ anyway...
There are a few different ways to expand ~, if you need to:
- Globbing - either <~madam> or glob('~madam') should both work, or you can look at File::Glob.
- Regexp to replace ~ with $ENV{HOME} assuming $HOME is set (it almost always is) on your Unix environment. That only works if you're interested in the current user's home dir of course.
- Some other module may do it - File::Spec doesn't but there are heaps of other modules under File:: on CPAN!
Hope that helps!
s^^unp(;75N=&9I<V@`ack(u,^;s|\(.+\`|"$`$'\"$&\"\)"|ee;/m.+h/&&print$&