i am trying to get the current working directory path using Perl

when i execute from ubuntu: $root@ubuntu:/var/test/geek# firefox http:/localhost/test.html, i get /var/cgi-bin as output in perl cgi page instead of /var/test/geek.

used perl code:

```
my $pwd=cwd();
 bla bla
print "<h1> pwd </h1>";

```

above code gives path of test.pl not users working directory path

Edit: When i run the script alone from the terminal it works fine. for example:

```
$root@ubuntu:/var/test/geek# /var/cgi-bin/test.pl 

```

i get /var/test/geek. but when i call the script in html page using submit button it gives path of perl script.