in reply to Matching a string that you do not have any really good information about

Perhaps you already have the information you need. If the CGI script (file) is owned by the user, then you can stat $0 to find it.

#!/usr/bin/perl -wT use strict; use CGI; use File::stat; my $q = new CGI; my $url = $q->url(); my $file = $0; my $stat = stat $file; my $uid = $stat->uid; my $user = getpwuid($uid); print $q->header; print << "--"; <html><head><head><body><pre> URL is $url File is $file UID is $uid Username is $user </pre></body></html> --