Ok, there's a few points I'd like to make.
read: perldoc perlvar AND perldoc perlsub
before continuing ;)
#1 local() is for perl's Variables, my() is for your variables.
#2 an array in scalar context evaluates to the number of elements in the
list, hence the 1.
I believe w
> I've created a subrutine to acces DB, but while sending the Query it get an
> error.
>
> My function looks like:
>
> sub DbSqlQuery
>{
>local $str_query = @_ if @_;
(Why are you using local? 'local' is deprecated in favor of 'my'.)
$str_query is a scalar, @_ is an array. Putting a scala
I've created a subrutine to acces DB, but while sending the Query it get an
error.
My function looks like:
sub DbSqlQuery
{
local $str_query = @_ if @_;
print $str_query;
<... blah, blah ..>
}
And my program call it like:
<... blah, blah ..>
$str_Query = "SELECT admin_ID, admin_name F