itortu
asked on
help converting asp with vbscript to perlscript
I need to get some help changing an asp page with vbscript code to perlscript instead.
I tried to do it but there are parts I don't understand. Any help or guidance is very much appreciated.
the page is very basic but I lack the knowledge to do it on my own.
Thank you.
asp page:
<%@ Language=VBScript %>
<%
Option Explicit
Response.Buffer = true
Response.charset="utf-8"
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>URL Id By Host</title>
<link rel=stylesheet type="text/css" href="report.css" TITLE="wow" />
</head>
<body>
<%
dim myParameterString, myQueryString, myhost
If Request.QueryString("host" ) <> "" Then
myhost = Request.Querystring("host" )
End If
%>
<form name="frmOne" id="frmOne" action="TMC_report.asp?hos t=<%=reque st.form("h ost")%>" method="get">
<span class="host">Host:</span>
<span class="indentHost"><input type="text" name="host" /></span>
<input type="submit" value="Submit" name="btn_submit" />
</form>
<br />
<%
dim cn, rs, sql, host, i, strOrderBy, tmpOrderBy, zip
host = request.querystring("host" )
strOrderBy = Request.QueryString("sortb y")
Select Case strOrderBy
Case "pv_a"
tmpOrderBy = " ORDER BY sumaccess ASC"
Case "pv_d"
tmpOrderBy = " ORDER BY sumaccess DESC"
Case "gi_a"
tmpOrderBy = "ORDER BY groupId ASC"
Case "gi_d"
tmpOrderBy = "ORDER BY groupId DESC"
End Select
cn= "Driver={SQL Server};Server=xxx.xxx.x.x x;Database =databasen ame;Uid=sa ;Pwd=passw ord;"
Set rs = Server.CreateObject("ADODB .Recordset ")
sql = "SELECT * FROM urlid_report_by_host where host like '" & myhost & "'" & tmpOrderBy
rs.Open sql, cn, 3,3
Dim colorset, c, numcolors, rlabel
colorset = split("#E6E8FA,#EEE0E5",", ")
numcolors = ubound(colorset)+1
%>
<table border="0" cellspacing="1" cellpadding="2" width="100%">
<tr>
<td class="head" valign="top">Host</td>
<td class="head" valign="top">URL Id</td>
<td class="head" valign="top">Group Id<br /><a href="TMC_report.asp?host= <%=host%>& amp;sortby =gi_a& btn_submit =Submit">< span class="link">ASC</span></a >|<a href="TMC_report.asp?sortb y=gi_d& ;host=<%=h ost%>& btn_submit =Submit">< span class="link">DESC</span></ a></td>
<td class="head" valign="top">Label</td>
<td class="head" valign="top">Access Views<br /><a href="TMC_report.asp?host= <%=host%>& amp;sortby =pv_a& btn_submit =Submit">< span class="link">ASC</span></a >|<a href="TMC_report.asp?sortb y=pv_d& ;host=<%=h ost%>& btn_submit =Submit">< span class="link">DESC</span></ a></td>
<td class="head" valign="top">Latitude</td>
<td class="head" valign="top">Longitude</td >
<td class="head" valign="top">Zip Code</td>
</tr>
<%
if not rs.eof and request("btn_submit") = "Submit" then
while not rs.eof
response.write " <tr style=""background:" & colorset(c mod numcolors) & ";"">"
%>
<td class="body" align="center"><p><%=Ucase (rs("Host" ))%></p></ td>
<td class="body" align="center" width="244"><p><a href="http://xxx.xxxxxx.xxx/xx/xxxx.asp?id=<%=trim(rs("url_id") )%>" target="_blank">http://xxx.xxxxxx.xxx/xx/xxxx.asp?id=<%=trim(rs ("URL_Id") )%></a></p ></td>
<td class="body" width="75" align="center"><p><%=trim( rs("groupI d"))%></p> </td>
<%
rlabel = rs("label")
rlabel = replace(rlabel,"&","&" )
%>
<td class="body"><p><%=rlabel% ></p></td>
<td class="body" width="75" align="center"><p><%=trim( rs("sumacc ess"))%></ p></td>
<td class="body" width="75" align="center"><p><%=trim( rs("latitu de"))%></p ></td>
<td class="body" width="75" align="center"><p><%=trim( rs("longit ude"))%></ p></td>
<%
if rs("Zip") <= "" OR ISNULL(rs("Zip")) then
zip = " <td class='nozip'><p>Not used</p></td>"
else
zip = " <td class='body' align='center'><p>" & rs("Zip") &"</p></td>"
end if
%>
<%=zip%>
</tr>
<%
c = c + 1
rs.MoveNext
wend
response.write " <tr>" & vbcrlf & " <td colspan='8' class='total'>Total number of records: " & rs.RecordCount & "</td>" & vbcrlf & " </tr>"
elseif host <> "" then
%>
<tr>
<td class="message" colspan=7><p>There are no records for host <%=Ucase(host)%>. Please try again.</p></td>
</tr>
<%
end if
response.write vbcrlf & "</table>"
%>
</body>
</html>
<%
rs.close
set rs=nothing
%>
I tried to do it but there are parts I don't understand. Any help or guidance is very much appreciated.
the page is very basic but I lack the knowledge to do it on my own.
Thank you.
asp page:
<%@ Language=VBScript %>
<%
Option Explicit
Response.Buffer = true
Response.charset="utf-8"
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>URL Id By Host</title>
<link rel=stylesheet type="text/css" href="report.css" TITLE="wow" />
</head>
<body>
<%
dim myParameterString, myQueryString, myhost
If Request.QueryString("host"
myhost = Request.Querystring("host"
End If
%>
<form name="frmOne" id="frmOne" action="TMC_report.asp?hos
<span class="host">Host:</span>
<span class="indentHost"><input type="text" name="host" /></span>
<input type="submit" value="Submit" name="btn_submit" />
</form>
<br />
<%
dim cn, rs, sql, host, i, strOrderBy, tmpOrderBy, zip
host = request.querystring("host"
strOrderBy = Request.QueryString("sortb
Select Case strOrderBy
Case "pv_a"
tmpOrderBy = " ORDER BY sumaccess ASC"
Case "pv_d"
tmpOrderBy = " ORDER BY sumaccess DESC"
Case "gi_a"
tmpOrderBy = "ORDER BY groupId ASC"
Case "gi_d"
tmpOrderBy = "ORDER BY groupId DESC"
End Select
cn= "Driver={SQL Server};Server=xxx.xxx.x.x
Set rs = Server.CreateObject("ADODB
sql = "SELECT * FROM urlid_report_by_host where host like '" & myhost & "'" & tmpOrderBy
rs.Open sql, cn, 3,3
Dim colorset, c, numcolors, rlabel
colorset = split("#E6E8FA,#EEE0E5",",
numcolors = ubound(colorset)+1
%>
<table border="0" cellspacing="1" cellpadding="2" width="100%">
<tr>
<td class="head" valign="top">Host</td>
<td class="head" valign="top">URL Id</td>
<td class="head" valign="top">Group Id<br /><a href="TMC_report.asp?host=
<td class="head" valign="top">Label</td>
<td class="head" valign="top">Access Views<br /><a href="TMC_report.asp?host=
<td class="head" valign="top">Latitude</td>
<td class="head" valign="top">Longitude</td
<td class="head" valign="top">Zip Code</td>
</tr>
<%
if not rs.eof and request("btn_submit") = "Submit" then
while not rs.eof
response.write " <tr style=""background:" & colorset(c mod numcolors) & ";"">"
%>
<td class="body" align="center"><p><%=Ucase
<td class="body" align="center" width="244"><p><a href="http://xxx.xxxxxx.xxx/xx/xxxx.asp?id=<%=trim(rs("url_id")
<td class="body" width="75" align="center"><p><%=trim(
<%
rlabel = rs("label")
rlabel = replace(rlabel,"&","&"
%>
<td class="body"><p><%=rlabel%
<td class="body" width="75" align="center"><p><%=trim(
<td class="body" width="75" align="center"><p><%=trim(
<td class="body" width="75" align="center"><p><%=trim(
<%
if rs("Zip") <= "" OR ISNULL(rs("Zip")) then
zip = " <td class='nozip'><p>Not used</p></td>"
else
zip = " <td class='body' align='center'><p>" & rs("Zip") &"</p></td>"
end if
%>
<%=zip%>
</tr>
<%
c = c + 1
rs.MoveNext
wend
response.write " <tr>" & vbcrlf & " <td colspan='8' class='total'>Total number of records: " & rs.RecordCount & "</td>" & vbcrlf & " </tr>"
elseif host <> "" then
%>
<tr>
<td class="message" colspan=7><p>There are no records for host <%=Ucase(host)%>. Please try again.</p></td>
</tr>
<%
end if
response.write vbcrlf & "</table>"
%>
</body>
</html>
<%
rs.close
set rs=nothing
%>
ASKER
hi Adam314:
i am not sure about functions such as trim, replace, ucase and their equivalent in perlscript.
I started changing the code, but i can't go forward after this part:
my $rs = Server->CreateObject('ADOD B.Recordse t');
this is what i changed so far:
<%@ Language=PerlScript %>
<%
use strict;
use DBD::ODBC;
$Response->{Buffer} = 1;
$Response->{CharSet} = "utf-8";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>TMC URL Id By Host</title>
<link rel=stylesheet type="text/css" href="report.css" TITLE="wow" />
</head>
<body>
<%
my myParameterString;
my myQueryString;
my myhost;
if (Request->QueryString('hos t') ne '')
{
$myhost = Request->Querystring('host ');
}
%>
<form name="frmOne" id="frmOne" action="TMC_report.asp?hos t=<%=reque st->form(' host')%>" method="get">
<span class="host">Host:</span>
<span class="indentHost"><input type="text" name="host" /></span>
<input type="submit" value="Submit" name="btn_submit" />
</form>
<br />
<%
my sql;
my host;
my i;
my strOrderBy;
my tmpOrderBy;
my zip;
$host = request->querystring('host ');
$strOrderBy = Request->QueryString('sort by');
if ($strorderBy = "pv_a")
{
$tmpOrderBy = " ORDER BY sumaccess ASC";
}
elsif ($strorderBy = "pv_d")
{
$tmpOrderBy = " ORDER BY sumaccess DESC";
}
elsif ($strOrderBy = "gi_a")
{
$tmpOrderBy = "ORDER BY groupId ASC";
}
elsif (strOrderBy = "gi_d")
{
$tmpOrderBy = "ORDER BY groupId DESC";
}
my $cn= 'Driver={SQL Server};Server=xxx.xxx.x.x x;Database =TargetedM icrocast;U id=sa;Pwd= myweather; ';
i am not sure about functions such as trim, replace, ucase and their equivalent in perlscript.
I started changing the code, but i can't go forward after this part:
my $rs = Server->CreateObject('ADOD
this is what i changed so far:
<%@ Language=PerlScript %>
<%
use strict;
use DBD::ODBC;
$Response->{Buffer} = 1;
$Response->{CharSet} = "utf-8";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>TMC URL Id By Host</title>
<link rel=stylesheet type="text/css" href="report.css" TITLE="wow" />
</head>
<body>
<%
my myParameterString;
my myQueryString;
my myhost;
if (Request->QueryString('hos
{
$myhost = Request->Querystring('host
}
%>
<form name="frmOne" id="frmOne" action="TMC_report.asp?hos
<span class="host">Host:</span>
<span class="indentHost"><input type="text" name="host" /></span>
<input type="submit" value="Submit" name="btn_submit" />
</form>
<br />
<%
my sql;
my host;
my i;
my strOrderBy;
my tmpOrderBy;
my zip;
$host = request->querystring('host
$strOrderBy = Request->QueryString('sort
if ($strorderBy = "pv_a")
{
$tmpOrderBy = " ORDER BY sumaccess ASC";
}
elsif ($strorderBy = "pv_d")
{
$tmpOrderBy = " ORDER BY sumaccess DESC";
}
elsif ($strOrderBy = "gi_a")
{
$tmpOrderBy = "ORDER BY groupId ASC";
}
elsif (strOrderBy = "gi_d")
{
$tmpOrderBy = "ORDER BY groupId DESC";
}
my $cn= 'Driver={SQL Server};Server=xxx.xxx.x.x
ASKER
the remaining code i don't know how to proceed. and to be honets i am not sure if what i have changed so far is correclty done.
my $sql = 'SELECT * FROM dbo.tmc_urlid_report_by_ho st where host like '" & myhost & "'" & tmpOrderBy
rs.Open sql, cn, 3,3
Dim colorset, c, numcolors, rlabel
colorset = split("#E6E8FA,#EEE0E5",", ")
numcolors = ubound(colorset)+1
%>
<table border="0" cellspacing="1" cellpadding="2" width="100%">
<tr>
<td class="head" valign="top">Host</td>
<td class="head" valign="top">URL Id</td>
<td class="head" valign="top">Group Id<br /><a href="TMC_report.asp?host= <%=host%>& amp;sortby =gi_a& btn_submit =Submit">< span class="link">ASC</span></a >|<a href="TMC_report.asp?sortb y=gi_d& ;host=<%=h ost%>& btn_submit =Submit">< span class="link">DESC</span></ a></td>
<td class="head" valign="top">Label</td>
<td class="head" valign="top">Access Views<br /><a href="TMC_report.asp?host= <%=host%>& amp;sortby =pv_a& btn_submit =Submit">< span class="link">ASC</span></a >|<a href="TMC_report.asp?sortb y=pv_d& ;host=<%=h ost%>& btn_submit =Submit">< span class="link">DESC</span></ a></td>
<td class="head" valign="top">Latitude</td>
<td class="head" valign="top">Longitude</td >
<td class="head" valign="top">Zip Code</td>
</tr>
<%
if not rs.eof and request("btn_submit") = "Submit" then
while not rs.eof
response.write " <tr style=""background:" & colorset(c mod numcolors) & ";"">"
%>
<td class="body" align="center"><p><%=Ucase (rs("Host" ))%></p></ td>
<td class="body" align="center" width="244"><p><a href="http://pmc.myweather.net/fc/mc.asp?id=<%=trim(rs("url_id") )%>" target="_blank">http://pmc.myweather.net/fc/mc.asp?id=<%=trim(rs ("URL_Id") )%></a></p ></td>
<td class="body" width="75" align="center"><p><%=trim( rs("groupI d"))%></p> </td>
<%
rlabel = rs("label")
rlabel = replace(rlabel,"&","&" )
%>
<td class="body"><p><%=rlabel% ></p></td>
<td class="body" width="75" align="center"><p><%=trim( rs("sumacc ess"))%></ p></td>
<td class="body" width="75" align="center"><p><%=trim( rs("latitu de"))%></p ></td>
<td class="body" width="75" align="center"><p><%=trim( rs("longit ude"))%></ p></td>
<%
if rs("Zip") <= "" OR ISNULL(rs("Zip")) then
zip = " <td class='nozip'><p>Not used</p></td>"
else
zip = " <td class='body' align='center'><p>" & rs("Zip") &"</p></td>"
end if
%>
<%=zip%>
</tr>
<%
c = c + 1
rs.MoveNext
wend
response.write " <tr>" & vbcrlf & " <td colspan='8' class='total'>Total number of records: " & rs.RecordCount & "</td>" & vbcrlf & " </tr>"
elseif host <> "" then
%>
<tr>
<td class="message" colspan=7><p>There are no records for host <%=Ucase(host)%>. Please try again.</p></td>
</tr>
<%
end if
response.write vbcrlf & "</table>"
%>
</body>
</html>
<%
rs.close
set rs=nothing
%>
my $sql = 'SELECT * FROM dbo.tmc_urlid_report_by_ho
rs.Open sql, cn, 3,3
Dim colorset, c, numcolors, rlabel
colorset = split("#E6E8FA,#EEE0E5",",
numcolors = ubound(colorset)+1
%>
<table border="0" cellspacing="1" cellpadding="2" width="100%">
<tr>
<td class="head" valign="top">Host</td>
<td class="head" valign="top">URL Id</td>
<td class="head" valign="top">Group Id<br /><a href="TMC_report.asp?host=
<td class="head" valign="top">Label</td>
<td class="head" valign="top">Access Views<br /><a href="TMC_report.asp?host=
<td class="head" valign="top">Latitude</td>
<td class="head" valign="top">Longitude</td
<td class="head" valign="top">Zip Code</td>
</tr>
<%
if not rs.eof and request("btn_submit") = "Submit" then
while not rs.eof
response.write " <tr style=""background:" & colorset(c mod numcolors) & ";"">"
%>
<td class="body" align="center"><p><%=Ucase
<td class="body" align="center" width="244"><p><a href="http://pmc.myweather.net/fc/mc.asp?id=<%=trim(rs("url_id")
<td class="body" width="75" align="center"><p><%=trim(
<%
rlabel = rs("label")
rlabel = replace(rlabel,"&","&"
%>
<td class="body"><p><%=rlabel%
<td class="body" width="75" align="center"><p><%=trim(
<td class="body" width="75" align="center"><p><%=trim(
<td class="body" width="75" align="center"><p><%=trim(
<%
if rs("Zip") <= "" OR ISNULL(rs("Zip")) then
zip = " <td class='nozip'><p>Not used</p></td>"
else
zip = " <td class='body' align='center'><p>" & rs("Zip") &"</p></td>"
end if
%>
<%=zip%>
</tr>
<%
c = c + 1
rs.MoveNext
wend
response.write " <tr>" & vbcrlf & " <td colspan='8' class='total'>Total number of records: " & rs.RecordCount & "</td>" & vbcrlf & " </tr>"
elseif host <> "" then
%>
<tr>
<td class="message" colspan=7><p>There are no records for host <%=Ucase(host)%>. Please try again.</p></td>
</tr>
<%
end if
response.write vbcrlf & "</table>"
%>
</body>
</html>
<%
rs.close
set rs=nothing
%>
For trim:
$var =~ s/^\s+//; #Remove leading whitespace
$var =~ s/\s+$//; #Remove trailing whitespace
For replace:
$var =~ tr/abc/def/; #replace abc with def
For ucase:
$var = uc($var);
For my $rs = Server->CreateObject('ADOD B.Recordse t');
this is creating an ADODB.Recordset object. The ADODB is an interface to a database. The more common database interface used in perl is DBI, but changing to the DBI module would require more work. To use the same ADODB interface:
my $rs = Win32::OLE->new("ADODB.Rec ordset");
If you aren't at all familiar with perl, you might want to do a little reading first. Try http://perldoc.perl.org, read the overview sections.
$var =~ s/^\s+//; #Remove leading whitespace
$var =~ s/\s+$//; #Remove trailing whitespace
For replace:
$var =~ tr/abc/def/; #replace abc with def
For ucase:
$var = uc($var);
For my $rs = Server->CreateObject('ADOD
this is creating an ADODB.Recordset object. The ADODB is an interface to a database. The more common database interface used in perl is DBI, but changing to the DBI module would require more work. To use the same ADODB interface:
my $rs = Win32::OLE->new("ADODB.Rec
If you aren't at all familiar with perl, you might want to do a little reading first. Try http://perldoc.perl.org, read the overview sections.
ASKER
this is far more complicated that was i thought.
do i keep or remove this part: rs.Open sql, cn, 3,3
what do i use for this part? :
colorset = split("#E6E8FA,#EEE0E5",", ")
numcolors = ubound(colorset)+1
if this is much to ask, i understand just let me know and i close the question, thank you adam314.
do i keep or remove this part: rs.Open sql, cn, 3,3
what do i use for this part? :
colorset = split("#E6E8FA,#EEE0E5",",
numcolors = ubound(colorset)+1
if this is much to ask, i understand just let me know and i close the question, thank you adam314.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
<%@ Language=PerlScript %>
<%
use Win32::OLE::Variant;
sub trim
{
my $val = shift;
$val =~ s/^\s+|\s+$//;
return $val;
}
sub Request
{
# don't know if perlscript has a builtin way
# to mirror vbscript's request object traversal so...
my $item = shift;
for my $collection ($Request->QueryString, $Request->Form, $Request->Cookies, $Request->ClientCertificat es, $Request->ServerVariables ) {
for (in $collection) {
return $collection->{$item}->Item if ($_ eq $item);
}
}
return undef;
}
sub Contains
{
my ($collection, $item) = @_;
for (in $collection) { return 1 if ($_ eq $item); }
return 0;
}
sub IsNull
{
my $variant = shift;
return ($variant->Type() == VT_NULL);
}
$Response->{Buffer} = 1;
$Response->{CharSet} = "utf-8";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>URL Id By Host</title>
<link rel=stylesheet type="text/css" href="report.css" TITLE="wow" />
</head>
<body>
<%
my ($myParameterString, $myQueryString, $myhost);
$myhost = $Request->QueryString("hos t")->Item if Contains($Request->QuerySt ring,"host ");
%>
<form name="frmOne" id="frmOne" action="TMC_report.asp?hos t=<%=$Requ est->Form( "host")->I tem %>" method="get">
<span class="host">Host:</span>
<span class="indentHost"><input type="text" name="host" /></span>
<input type="submit" value="Submit" name="btn_submit" />
</form>
<br />
<%
my ($cn, $rs, $sql, $host, $i, $strOrderBy, $tmpOrderBy, $zip);
$host = $Request->QueryString("hos t")->Item;
$strOrderBy = $Request->QueryString("sor tby")->Ite m;
$tmpOrderBy = " ORDER BY sumaccess ASC" if $strOrderBy eq "pv_a";
$tmpOrderBy = " ORDER BY sumaccess DESC" if $strOrderBy eq "pv_d"
$tmpOrderBy = " ORDER BY groupId ASC" if $strOrderBy eq "gi_a";
$tmpOrderBy = " ORDER BY groupId DESC" if $strOrderBy eq "gi_d";
$cn = "Driver={SQL Server};Server=xxx.xxx.x.x x;Database =databasen ame;Uid=sa ;Pwd=passw ord;";
$rs = $Server->CreateObject("ADO DB.Records et")
$sql = "SELECT * FROM urlid_report_by_host where host like '$myhost' $tmpOrderBy";
$rs->Open($sql, $cn, 3, 3);
my (@colorset, $c, $numcolors, $rlabel)
@colorset = ("#E6E8FA", "#EEE0E5");
$numcolors = $#colorset + 1;
%>
<table border="0" cellspacing="1" cellpadding="2" width="100%">
<tr>
<td class="head" valign="top">Host</td>
<td class="head" valign="top">URL Id</td>
<td class="head" valign="top">Group Id<br /><a href="TMC_report.asp?host= <%=$host%> &sortb y=gi_a& ;btn_submi t=Submit"> <span class="link">ASC</span></a >|<a href="TMC_report.asp?sortb y=gi_d& ;host=<%=$ host%>& ;btn_submi t=Submit"> <span class="link">DESC</span></ a></td>
<td class="head" valign="top">Label</td>
<td class="head" valign="top">Access Views<br /><a href="TMC_report.asp?host= <%=$host%> &sortb y=pv_a& ;btn_submi t=Submit"> <span class="link">ASC</span></a >|<a href="TMC_report.asp?sortb y=pv_d& ;host=<%=$ host%>& ;btn_submi t=Submit"> <span class="link">DESC</span></ a></td>
<td class="head" valign="top">Latitude</td>
<td class="head" valign="top">Longitude</td >
<td class="head" valign="top">Zip Code</td>
</tr>
<%
if (!$rs->{EOF} && (Request('btn_submit') eq "Submit")) {
while (!$rs->{EOF}) {
$colorindex = $c % $numcolors;
%>
<tr style="background:$colorse t[$colorin dex];">
<td class="body" align="center"><p><%=uc($r s->Fields( "Host")->{ Value}))%> </p></td>
<td class="body" align="center" width="244"><p><a href="http://xxx.xxxxxx.xxx/xx/xxxx.asp?id=<%=trim($rs->Fields( "url_id")- >{Value})% >" target="_blank">http://xxx.xxxxxx.xxx/xx/xxxx.asp?id=<%=trim($r s->Fields( "URL_Id")- >{Value})% ></a></p>< /td>
<td class="body" width="75" align="center"><p><%=trim( $rs->Field s("groupId ")->{Value })%></p></ td>
<%
$rlabel = $rs->Fields("label")->{Val ue}
$rlabel =~ s/&/&/g;
%>
<td class="body"><p><%=$rlabel %></p></td >
<td class="body" width="75" align="center"><p><%=trim( $rs->Field s("sumacce ss")->{Val ue})%></p> </td>
<td class="body" width="75" align="center"><p><%=trim( $rs->Field s("latitud e")->{Valu e})%></p>< /td>
<td class="body" width="75" align="center"><p><%=trim( $rs->Field s("longitu de")->{Val ue})%></p> </td>
<%
if ( !($rs->Fields("Zip")->{Val ue} gt "") || IsNull($rs->Fields("Zip")- >{Value}) ) {
$zip = " <td class='nozip'><p>Not used</p></td>";
}
else {
$zip = " <td class='body' align='center'><p>".$rs->F ields("Zip ")->{Value }."</p></t d>"
}
%>
<%=$zip%>
</tr>
<%
$c++;
$rs->MoveNext();
}
%>
<tr>
<td colspan='8' class='total'>Total number of records: <%= $rs->{RecordCount} %></td>
</tr>
elsif $host eq "" {
%>
<tr>
<td class="message" colspan=7><p>There are no records for host <%=uc($host)%>. Please try again.</p></td>
</tr>
<%
}
%>
</table>
</body>
</html>
<%
$rs->Close();
undef $rs;
%>
<%
use Win32::OLE::Variant;
sub trim
{
my $val = shift;
$val =~ s/^\s+|\s+$//;
return $val;
}
sub Request
{
# don't know if perlscript has a builtin way
# to mirror vbscript's request object traversal so...
my $item = shift;
for my $collection ($Request->QueryString, $Request->Form, $Request->Cookies, $Request->ClientCertificat
for (in $collection) {
return $collection->{$item}->Item
}
}
return undef;
}
sub Contains
{
my ($collection, $item) = @_;
for (in $collection) { return 1 if ($_ eq $item); }
return 0;
}
sub IsNull
{
my $variant = shift;
return ($variant->Type() == VT_NULL);
}
$Response->{Buffer} = 1;
$Response->{CharSet} = "utf-8";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>URL Id By Host</title>
<link rel=stylesheet type="text/css" href="report.css" TITLE="wow" />
</head>
<body>
<%
my ($myParameterString, $myQueryString, $myhost);
$myhost = $Request->QueryString("hos
%>
<form name="frmOne" id="frmOne" action="TMC_report.asp?hos
<span class="host">Host:</span>
<span class="indentHost"><input type="text" name="host" /></span>
<input type="submit" value="Submit" name="btn_submit" />
</form>
<br />
<%
my ($cn, $rs, $sql, $host, $i, $strOrderBy, $tmpOrderBy, $zip);
$host = $Request->QueryString("hos
$strOrderBy = $Request->QueryString("sor
$tmpOrderBy = " ORDER BY sumaccess ASC" if $strOrderBy eq "pv_a";
$tmpOrderBy = " ORDER BY sumaccess DESC" if $strOrderBy eq "pv_d"
$tmpOrderBy = " ORDER BY groupId ASC" if $strOrderBy eq "gi_a";
$tmpOrderBy = " ORDER BY groupId DESC" if $strOrderBy eq "gi_d";
$cn = "Driver={SQL Server};Server=xxx.xxx.x.x
$rs = $Server->CreateObject("ADO
$sql = "SELECT * FROM urlid_report_by_host where host like '$myhost' $tmpOrderBy";
$rs->Open($sql, $cn, 3, 3);
my (@colorset, $c, $numcolors, $rlabel)
@colorset = ("#E6E8FA", "#EEE0E5");
$numcolors = $#colorset + 1;
%>
<table border="0" cellspacing="1" cellpadding="2" width="100%">
<tr>
<td class="head" valign="top">Host</td>
<td class="head" valign="top">URL Id</td>
<td class="head" valign="top">Group Id<br /><a href="TMC_report.asp?host=
<td class="head" valign="top">Label</td>
<td class="head" valign="top">Access Views<br /><a href="TMC_report.asp?host=
<td class="head" valign="top">Latitude</td>
<td class="head" valign="top">Longitude</td
<td class="head" valign="top">Zip Code</td>
</tr>
<%
if (!$rs->{EOF} && (Request('btn_submit') eq "Submit")) {
while (!$rs->{EOF}) {
$colorindex = $c % $numcolors;
%>
<tr style="background:$colorse
<td class="body" align="center"><p><%=uc($r
<td class="body" align="center" width="244"><p><a href="http://xxx.xxxxxx.xxx/xx/xxxx.asp?id=<%=trim($rs->Fields(
<td class="body" width="75" align="center"><p><%=trim(
<%
$rlabel = $rs->Fields("label")->{Val
$rlabel =~ s/&/&/g;
%>
<td class="body"><p><%=$rlabel
<td class="body" width="75" align="center"><p><%=trim(
<td class="body" width="75" align="center"><p><%=trim(
<td class="body" width="75" align="center"><p><%=trim(
<%
if ( !($rs->Fields("Zip")->{Val
$zip = " <td class='nozip'><p>Not used</p></td>";
}
else {
$zip = " <td class='body' align='center'><p>".$rs->F
}
%>
<%=$zip%>
</tr>
<%
$c++;
$rs->MoveNext();
}
%>
<tr>
<td colspan='8' class='total'>Total number of records: <%= $rs->{RecordCount} %></td>
</tr>
elsif $host eq "" {
%>
<tr>
<td class="message" colspan=7><p>There are no records for host <%=uc($host)%>. Please try again.</p></td>
</tr>
<%
}
%>
</table>
</body>
</html>
<%
$rs->Close();
undef $rs;
%>
ASKER
hi clockwatcher and thank you for changing the whole script for me.
i am trying to run the page, but i get some errors that may be if you have time, can help me debug.
PerlScript Error (0x80004005)
syntax error at (eval 2) line 34, near ") my "
syntax error at (eval 2) line 37, near ") Response"
syntax error at (eval 2) line 44, near ""pv_d" $tmpOrderBy "
syntax error at (eval 2) line 48, near ") $sql "
syntax error at (eval 2) line 51, near ") @colorset " syntax error
/targetedmc/perlscript_TMC _report.as p, line 102
line 102 :
<td class="head" valign="top">Group Id<br /><a href="perlscript_TMC_repor t.asp?host =<%=$host% >&sort by=gi_a&am p;btn_subm it=Submit" ><span class="link">ASC</span></a >|<a href="perlscript_TMC_repor t.asp?sort by=gi_d&am p;host=<%= $host%>&am p;btn_subm it=Submit" ><span class="link">DESC</span></ a></td>
Once again, thank you for your help.
i am trying to run the page, but i get some errors that may be if you have time, can help me debug.
PerlScript Error (0x80004005)
syntax error at (eval 2) line 34, near ") my "
syntax error at (eval 2) line 37, near ") Response"
syntax error at (eval 2) line 44, near ""pv_d" $tmpOrderBy "
syntax error at (eval 2) line 48, near ") $sql "
syntax error at (eval 2) line 51, near ") @colorset " syntax error
/targetedmc/perlscript_TMC
line 102 :
<td class="head" valign="top">Group Id<br /><a href="perlscript_TMC_repor
Once again, thank you for your help.
ASKER
i'm not sure if this has something to do with use Win32::OLE::Variant;
i check the Perl lib folder and I found the module Win32.pm
do I have to install something else?
i check the Perl lib folder and I found the module Win32.pm
do I have to install something else?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
most of the syntax errors were corrected with your new code, there are two that still remain.
syntax error at (eval 2) line 34, near ") my "
syntax error at (eval 2) line 37, near ") Response"
syntax error
/targetedmc/perlscript_TMC _report.as p, line 102
syntax error at (eval 2) line 34, near ") my "
syntax error at (eval 2) line 37, near ") Response"
syntax error
/targetedmc/perlscript_TMC
It runs on two of my machines without error and nowhere do I have either a ") my" or a ") Response".
The only place I even reference Response is:
$Response->{Buffer} = 1;
$Response->{CharSet} = "utf-8";
And there's no reference to a my anywhere near three lines above that.
Can you copy and paste the code you're using?
The only place I even reference Response is:
$Response->{Buffer} = 1;
$Response->{CharSet} = "utf-8";
And there's no reference to a my anywhere near three lines above that.
Can you copy and paste the code you're using?
ASKER
<%@ Language=PerlScript %>
<%
use Win32::OLE::Variant;
sub trim
{
my $val = shift;
$val =~ s/^\s+|\s+$//;
return $val;
}
sub Request
{
# don't know if perlscript has a builtin way
# to mirror vbscript's request object traversal so...
my $item = shift;
for my $collection ($Request->QueryString, $Request->Form, $Request->Cookies, $Request->ClientCertificat es, $Request->ServerVariables ) {
for (in $collection) {
return $collection->{$item}->Item if ($_ eq $item);
}
}
return undef;
}
sub Contains
{
my ($collection, $item) = @_;
for (in $collection) { return 1 if ($_ eq $item); }
return 0;
}
sub IsNull
{
my $variant = shift;
return ($variant->Type() == VT_NULL);
}
$Response->{Buffer} = 1;
$Response->{CharSet} = "utf-8";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>URL Id By Host</title>
<link rel=stylesheet type="text/css" href="report.css" TITLE="wow" />
</head>
<body>
<%
my ($myParameterString, $myQueryString, $myhost);
$myhost = $Request->QueryString("hos t")->Item if Contains($Request->QuerySt ring,"host ");
%>
<form name="frmOne" id="frmOne" action="TMC_report.asp?hos t=<%=$Requ est->Form( "host")->I tem %>" method="get">
<span class="host">Host:</span>
<span class="indentHost"><input type="text" name="host" /></span>
<input type="submit" value="Submit" name="btn_submit" />
</form>
<br />
<%
my ($cn, $rs, $sql, $host, $i, $strOrderBy, $tmpOrderBy, $zip);
$host = $Request->QueryString("hos t")->Item;
$strOrderBy = $Request->QueryString("sor tby")->Ite m;
$tmpOrderBy = " ORDER BY sumaccess ASC" if $strOrderBy eq "pv_a";
$tmpOrderBy = " ORDER BY sumaccess DESC" if $strOrderBy eq "pv_d";
$tmpOrderBy = " ORDER BY groupId ASC" if $strOrderBy eq "gi_a";
$tmpOrderBy = " ORDER BY groupId DESC" if $strOrderBy eq "gi_d";
$cn = "Driver={SQL Server};Server=xxx.xxx.x.x x;Database =TargetedM icrocast;U id=sa;Pwd= myweather; ";
$rs = $Server->CreateObject("ADO DB.Records et");
$sql = "SELECT * FROM urlid_report_by_host where host like '$myhost' $tmpOrderBy";
$rs->Open($sql, $cn, 3, 3);
my (@colorset, $c, $numcolors, $rlabel);
@colorset = ("#E6E8FA", "#EEE0E5");
$numcolors = $#colorset + 1;
%>
<table border="0" cellspacing="1" cellpadding="2" width="100%">
<tr>
<td class="head" valign="top">Host</td>
<td class="head" valign="top">URL Id</td>
<td class="head" valign="top">Group Id<br /><a href="TMC_report.asp?host= <%=$host%> &sortb y=gi_a& ;btn_submi t=Submit"> <span class="link">ASC</span></a >|<a href="TMC_report.asp?sortb y=gi_d& ;host=<%=$ host%>& ;btn_submi t=Submit"> <span class="link">DESC</span></ a></td>
<td class="head" valign="top">Label</td>
<td class="head" valign="top">Access Views<br /><a href="TMC_report.asp?host= <%=$host%> &sortb y=pv_a& ;btn_submi t=Submit"> <span class="link">ASC</span></a >|<a href="TMC_report.asp?sortb y=pv_d& ;host=<%=$ host%>& ;btn_submi t=Submit"> <span class="link">DESC</span></ a></td>
<td class="head" valign="top">Latitude</td>
<td class="head" valign="top">Longitude</td >
<td class="head" valign="top">Zip Code</td>
</tr>
<%
if (!$rs->{EOF} && (Request('btn_submit') eq "Submit")) {
while (!$rs->{EOF}) {
$colorindex = $c % $numcolors;
%>
<tr style="background:$colorse t[$colorin dex];">
<td class="body" align="center"><p><%=uc($r s->Fields( "Host")->{ Value})%>< /p></td>
<td class="body" align="center" width="244"><p><a href="http://xxx.xxxxxx.xxx/xx/xxxx.asp?id=<%=trim($rs->Fields( "url_id")- >{Value})% >" target="_blank">http://xxx.xxxxxx.xxx/xx/xxxx.asp?id=<%=trim($r s->Fields( "URL_Id")- >{Value})% ></a></p>< /td>
<td class="body" width="75" align="center"><p><%=trim( $rs->Field s("groupId ")->{Value })%></p></ td>
<%
$rlabel = $rs->Fields("label")->{Val ue};
$rlabel =~ s/&/&/g;
%>
<td class="body"><p><%=$rlabel %></p></td >
<td class="body" width="75" align="center"><p><%=trim( $rs->Field s("sumacce ss")->{Val ue})%></p> </td>
<td class="body" width="75" align="center"><p><%=trim( $rs->Field s("latitud e")->{Valu e})%></p>< /td>
<td class="body" width="75" align="center"><p><%=trim( $rs->Field s("longitu de")->{Val ue})%></p> </td>
<%
if ( !($rs->Fields("Zip")->{Val ue} gt "") || IsNull($rs->Fields("Zip")- >{Value}) ) {
$zip = " <td class='nozip'><p>Not used</p></td>";
}
else {
$zip = " <td class='body' align='center'><p>".$rs->F ields("Zip ")->{Value }."</p></t d>"
}
%>
<%=$zip%>
</tr>
<%
$c++;
$rs->MoveNext();
}
%>
<tr>
<td colspan='8' class='total'>Total number of records: <%= $rs->{RecordCount} %></td>
</tr>
elsif $host eq "" {
%>
<tr>
<td class="message" colspan=7><p>There are no records for host <%=uc($host)%>. Please try again.</p></td>
</tr>
<%
}
%>
</table>
</body>
</html>
<%
$rs->Close();
undef $rs;
%>
<%
use Win32::OLE::Variant;
sub trim
{
my $val = shift;
$val =~ s/^\s+|\s+$//;
return $val;
}
sub Request
{
# don't know if perlscript has a builtin way
# to mirror vbscript's request object traversal so...
my $item = shift;
for my $collection ($Request->QueryString, $Request->Form, $Request->Cookies, $Request->ClientCertificat
for (in $collection) {
return $collection->{$item}->Item
}
}
return undef;
}
sub Contains
{
my ($collection, $item) = @_;
for (in $collection) { return 1 if ($_ eq $item); }
return 0;
}
sub IsNull
{
my $variant = shift;
return ($variant->Type() == VT_NULL);
}
$Response->{Buffer} = 1;
$Response->{CharSet} = "utf-8";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>URL Id By Host</title>
<link rel=stylesheet type="text/css" href="report.css" TITLE="wow" />
</head>
<body>
<%
my ($myParameterString, $myQueryString, $myhost);
$myhost = $Request->QueryString("hos
%>
<form name="frmOne" id="frmOne" action="TMC_report.asp?hos
<span class="host">Host:</span>
<span class="indentHost"><input type="text" name="host" /></span>
<input type="submit" value="Submit" name="btn_submit" />
</form>
<br />
<%
my ($cn, $rs, $sql, $host, $i, $strOrderBy, $tmpOrderBy, $zip);
$host = $Request->QueryString("hos
$strOrderBy = $Request->QueryString("sor
$tmpOrderBy = " ORDER BY sumaccess ASC" if $strOrderBy eq "pv_a";
$tmpOrderBy = " ORDER BY sumaccess DESC" if $strOrderBy eq "pv_d";
$tmpOrderBy = " ORDER BY groupId ASC" if $strOrderBy eq "gi_a";
$tmpOrderBy = " ORDER BY groupId DESC" if $strOrderBy eq "gi_d";
$cn = "Driver={SQL Server};Server=xxx.xxx.x.x
$rs = $Server->CreateObject("ADO
$sql = "SELECT * FROM urlid_report_by_host where host like '$myhost' $tmpOrderBy";
$rs->Open($sql, $cn, 3, 3);
my (@colorset, $c, $numcolors, $rlabel);
@colorset = ("#E6E8FA", "#EEE0E5");
$numcolors = $#colorset + 1;
%>
<table border="0" cellspacing="1" cellpadding="2" width="100%">
<tr>
<td class="head" valign="top">Host</td>
<td class="head" valign="top">URL Id</td>
<td class="head" valign="top">Group Id<br /><a href="TMC_report.asp?host=
<td class="head" valign="top">Label</td>
<td class="head" valign="top">Access Views<br /><a href="TMC_report.asp?host=
<td class="head" valign="top">Latitude</td>
<td class="head" valign="top">Longitude</td
<td class="head" valign="top">Zip Code</td>
</tr>
<%
if (!$rs->{EOF} && (Request('btn_submit') eq "Submit")) {
while (!$rs->{EOF}) {
$colorindex = $c % $numcolors;
%>
<tr style="background:$colorse
<td class="body" align="center"><p><%=uc($r
<td class="body" align="center" width="244"><p><a href="http://xxx.xxxxxx.xxx/xx/xxxx.asp?id=<%=trim($rs->Fields(
<td class="body" width="75" align="center"><p><%=trim(
<%
$rlabel = $rs->Fields("label")->{Val
$rlabel =~ s/&/&/g;
%>
<td class="body"><p><%=$rlabel
<td class="body" width="75" align="center"><p><%=trim(
<td class="body" width="75" align="center"><p><%=trim(
<td class="body" width="75" align="center"><p><%=trim(
<%
if ( !($rs->Fields("Zip")->{Val
$zip = " <td class='nozip'><p>Not used</p></td>";
}
else {
$zip = " <td class='body' align='center'><p>".$rs->F
}
%>
<%=$zip%>
</tr>
<%
$c++;
$rs->MoveNext();
}
%>
<tr>
<td colspan='8' class='total'>Total number of records: <%= $rs->{RecordCount} %></td>
</tr>
elsif $host eq "" {
%>
<tr>
<td class="message" colspan=7><p>There are no records for host <%=uc($host)%>. Please try again.</p></td>
</tr>
<%
}
%>
</table>
</body>
</html>
<%
$rs->Close();
undef $rs;
%>
Weird. Runs fine on my system. And I don't see any references to a bare "Response" anywhere. I don't think I'm going to be able to help, because I don't see how the errors you're getting are coming from the code that's up there.
To help solve: Comment out some lines around lines 34-37, and see if it runs. If so, you know one of those commented lines is causing the problem. If you still get an error: comment more lines and try again. Keep going until you determine which lines are causing the problem.
Is there a reason you are using perlscript instead of perl?
I think it'd be easier to get help if you were using perl.
Is there a reason you are using perlscript instead of perl?
I think it'd be easier to get help if you were using perl.
ASKER
hi Adam314,
i will commnet out the lines as you said. also, if this is done using perl can it still be run from this page?
if you don't mind showing me how this is done, i am open to try it.
thank you.
itortu.
i will commnet out the lines as you said. also, if this is done using perl can it still be run from this page?
if you don't mind showing me how this is done, i am open to try it.
thank you.
itortu.
ASKER
i commented out this sub
#sub IsNull
#{
# my $variant = shift;
# return ($variant->Type() == VT_NULL);
#}
because this are lines 33-37 but when i run the page, it keeps sending the same message
PerlScript Error (0x80004005)
syntax error at (eval 2) line 34, near ") my "
syntax error at (eval 2) line 37, near ") Response"
syntax error
/perlscript_TMC_report.asp , line 102
am i commenting out the lines correctly?
#sub IsNull
#{
# my $variant = shift;
# return ($variant->Type() == VT_NULL);
#}
because this are lines 33-37 but when i run the page, it keeps sending the same message
PerlScript Error (0x80004005)
syntax error at (eval 2) line 34, near ") my "
syntax error at (eval 2) line 37, near ") Response"
syntax error
/perlscript_TMC_report.asp
am i commenting out the lines correctly?
I'm not sure. I know that would be correct in perl, but am not familiar with perlscript.
Try commenting out the rest of the file, from line 33 - end. If it works, then uncomment a few lines at a time until it stop working - that should help narrow it down.
Try commenting out the rest of the file, from line 33 - end. If it works, then uncomment a few lines at a time until it stop working - that should help narrow it down.
ASKER
i think it this line:
use Win32::OLE::Variant;
the Variant part, how do I know if I have this module installed?
use Win32::OLE::Variant;
the Variant part, how do I know if I have this module installed?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
i am doing the conversion for curiosity, and i appreciate all your help. i apologize if i have bugged you with this for a simple reason. i would like to learn more perl but it is hard to find some time to do it.
thank you.
thank you.
I've had strange/difficult to find errors before. This is what I do: comment out the entire program. Make sure it runs (of course, nothing happens). This lets you know the problem is not with your configuration or settings or anything like that. Uncomment a few lines, and re-run (of course, if you uncomment the start of a sub, you need to uncomment the closing curly brace). Repeat this (uncomment a few lines, then re-run) until you find the error.
If you want to learn perl, and are doing this for curiosity, I would start by reading a perl book. Or at least some tutorials on the web. Once you understand the basics, then you could convert the ASP to perl.
I know everyone likes to learn differently, but I don't think you'll be able to get much from seeing similiar (to the VBScript) in perl until you have the basic down.
I don't mind helping (and I'm guessing other experts agree), even if what you want to do is just learn and play around. I just think you'll get more using other methods.
If you want to learn perl, and are doing this for curiosity, I would start by reading a perl book. Or at least some tutorials on the web. Once you understand the basics, then you could convert the ASP to perl.
I know everyone likes to learn differently, but I don't think you'll be able to get much from seeing similiar (to the VBScript) in perl until you have the basic down.
I don't mind helping (and I'm guessing other experts agree), even if what you want to do is just learn and play around. I just think you'll get more using other methods.
You're certainly not bugging any of us. I was just wondering why you decided to go with PerlScript.
I wish I could be of more help, but I have no idea why you're getting the errors that you're getting since they reference code that doesn't even exist in the page that you're trying to execute. I'd guess that you had a cached version of the page or something, but since the modified code did cut down on the number of errors it doesn't seem likely to be that.
Commenting lines until you find the problem as Adam suggested would be a good approach, but it's liable to break something else-- not sure that that wouldn't be an improvement-- at least it would be a change.
The "Response" error really makes no sense at all. Since nothing references Response. There are only two references to the word Response and both of those are $Response-- not just Response. Anyway... very odd errors.
Converting the page to a perl (not perlscript) version, would allow you to get more help when you run into problems. There just aren't enough people around that use PerlScript.
I wish I could be of more help, but I have no idea why you're getting the errors that you're getting since they reference code that doesn't even exist in the page that you're trying to execute. I'd guess that you had a cached version of the page or something, but since the modified code did cut down on the number of errors it doesn't seem likely to be that.
Commenting lines until you find the problem as Adam suggested would be a good approach, but it's liable to break something else-- not sure that that wouldn't be an improvement-- at least it would be a change.
The "Response" error really makes no sense at all. Since nothing references Response. There are only two references to the word Response and both of those are $Response-- not just Response. Anyway... very odd errors.
Converting the page to a perl (not perlscript) version, would allow you to get more help when you run into problems. There just aren't enough people around that use PerlScript.
ASKER
no problem guysm thank yo uvery much for helping me. i will buy a perl book to learn its syntax the right way. i won't have internet for the rest of the day, and i don't want to close the question in a rush. by thirsday i will have internet access again and i will go thorugh the comments on the question, to split the points fairly between the two o f you guys, since you both have offered me valuable recommendations.
thank you again.
itortu.
thank you again.
itortu.
Why perlscript instead of just perl?