Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Perl Newbie needs help with Script 1

Status
Not open for further replies.

jdm6457

Technical User
Joined
Apr 16, 2007
Messages
6
Location
US
This script works fine when CGI is not loaded, and when CGI is loaded the $data_source string does not build correctly. Any help would be greatly appreciated!!!

-john

use DBI;
use CGI qw(:standard :html3);
use Term::ReadKey;

# Request IP address of Server
print " \n";
print "What is the IP address of the server? ";
$IPadd = <STDIN>;
chomp ($IPadd);
print " \n";

# Request password and mask entry
print 'Please Enter sa Password: ';
ReadMode 'noecho';
$password = <STDIN>;
chomp ($password);
ReadMode 'normal';
print " \n";

$data_source = "driver={SQL Server};Server={$IPadd};database={UnityDb};UID={sa};PWD={$password}";

print "$data_source";
 
I don't know why the CGI module is causing a problem, but since it's not cgi script why are you loading it?

------------------------------------------
- Kevin, perl coder unexceptional! [wiggle]
 
Sorry, I should have stated this in my original post.

I want to use builtin functions of the CGI module to create HTML code with tables. I excluded the CGI code from my post since I have already tested and is working fine.
 
if that's all you want to use the CGI module for, then don't even use it. Just build up your html table code manually.

------------------------------------------
- Kevin, perl coder unexceptional! [wiggle]
 
That is exactly what I did... thanks for the input!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top