E
Ela
some day i read a book telling that it may be useful to print a variable
name for debugging purpose. since i was new that moment, i just skipped it.
now when i want to use this feature, i no longer get back where it is.
google search using perl and "print variable name" does not return good
results. And I am not going to use hash because i just want to debug, e..g.
I expect
$var1 = 3;
$ALongVariable = "hahahaha";
debug($var1);
debug($ALongVariable);
sub debug {
$dvar = shift;
some more codes here?
print $dvar;
print "\n";
}
=======
to print out:
$var1 : 3
$ALongVariable : hahahaha
Could anybody help?
name for debugging purpose. since i was new that moment, i just skipped it.
now when i want to use this feature, i no longer get back where it is.
google search using perl and "print variable name" does not return good
results. And I am not going to use hash because i just want to debug, e..g.
I expect
$var1 = 3;
$ALongVariable = "hahahaha";
debug($var1);
debug($ALongVariable);
sub debug {
$dvar = shift;
some more codes here?
print $dvar;
print "\n";
}
=======
to print out:
$var1 : 3
$ALongVariable : hahahaha
Could anybody help?