while(my $line = ){ chomp $line; if($. % 2 == 0){ print $cgi->p('',$cgi->a( {-href => $url}, $line ) ); } else{ $url = $line; } close F;