リンク先を絶対パスで取得
URIモジュールを使うと簡単です。
use strict;
use CGI;
use URI;
my $q = CGI->new();
my $base = $q->url;
my $uri = URI->new_abs('../index.html', $base);
my $redirect = $q->redirect($uri);
上記スクリプトが http://www.example.com/cgi-bin/uri.cgi で動いていたとすると、$redirectには http://www.example.com/index.html が入ります。関連項目
・CGIのURL取得・クエリ付きURIの作成
・別ページに遷移
