use CGI; my $query = new CGI; my $url = $query->param('url'); my $name = $query->param('name'); $url = "http://" . $url if $url && $url !~ m#^http://#i; open FILE, ">foo" or die "Can't open foo: $!"; print FILE $url ? "<a href=$url>$name</a>" : $name; close FILE or die "Can't close foo: $!";
In reply to Re: easy question for perl novice
by btrott
in thread easy question for perl novice
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |