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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

what is happening in this code

Status
Not open for further replies.

mtrasp

Programmer
Jun 15, 2009
35
US
hi , iam new to perl i am trying to understand this code please tell me more about this code .what i need to learn to understand this code

my $sql = "exec pr_SelectPhysicalLocation $Build,$operatingsystem";

if ($mydb->Sql($sql))
{
Win32::ODBC::DumpError();
}
if ($mydb->FetchRow())
{
%Info = $mydb->DataHash();
$SourcePath = $KitInfo{PhysicalLocation};
$Baseline = $KitInfo{BaselineVersionShortName};
writelog(info,"destdir = $SourcePath");
}
$mydb->Close();
 
You need to learn perl.

This code is executing a SQL query (which in it's self seems to be calling stored procedure). Declaring a hash, assigning come variables with values and then closing the db connection.
 
Hi

You'd need to look at the surrounding script as well to understand it. It's a lot to understand in one go though. I would struggle to explain this code in person, to somelne sho didn't understand Perl.

Mike

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top