$aturl =~ /^http:\/\/$myuser(.*)$/i; # capture everything after the domain $match = $1; # assign the captured stuff to a new variable.