No what I mean is that it is not perl that is doing the substitution of the '~' it is the shell, if you print $ARGV[0] as the first thing in your program you will see what is happening. You need to call your program like
program.pl 'http://www.xs4all.nl/~werksman/webmees/index.html'
or
program.pl http://www.xs4all.nl/\~werksman/webmees/index.html
to prevent the '~' from being substituted for the path to your home directory.
/J\ |