in reply to shell to perl
The code below will give you the same output as "whoami" without having to make a system call.
my $id = (getpwuid($<))[0]; print qq($id\n); [download]