print $ENV{'DOCUMENT_ROOT'};

なcgiをサーバーに置いといて、

$ligne = `/usr/bin/lynx -dump http://localhost:80/documentroot.cgi`;

こんな感じのスクリプトを動かせばいいんちゃう。