#!/usr/bin/perl -- use strict; use warnings; use URI; my $path = { URI->new( "/index.php?prefix=/user/" )->query_form }->{prefix}; print "$path\n"; use CGI; $path = CGI->new( "prefix=/user/")->param("prefix"); print "$path\n"; __END__ /user/ /user/