Since I can assume you are using apache, I know this will work:
If "/user" is executable, when the browser calls /user, /jack will be in the PATH_INFO environment variable, which you can use raw $ENV{PATH_INFO} or you can get at using CGI.pm (or other modules):
use CGI;
$C = CGI->new();
$temp_user = $C->path_info();
$user = "";
# for taint checking
if ($temp_user =~ /^\/(\w+)/) {
$user = $1;
}
# do something with $user here
# which if called as /user/jack will be "jack"