Soldato
- Joined
- 15 Nov 2008
- Posts
- 5,060
- Location
- In the ether
Hi,
A quick question about Perl. Say I have the following script:
$a = 2;
$b = 3;
$name = "Fred Blogs\n";
print "Floppy!";
print $name;
print "Floppy2!";
$c = $a+$b;
Now using the debugger I can see that as soon as $a and $b are initialized I can see their values so if I break at line 2 and do
>p $a
==2
I can see that $a has value 2. But if I break at line 4 I can't see anything in $name
>p $name
==
But once $name is used on line 5 I can then see it :/
Is this some sort of dynamic variable scoping so checking at the method what the object is?
A quick question about Perl. Say I have the following script:
$a = 2;
$b = 3;
$name = "Fred Blogs\n";
print "Floppy!";
print $name;
print "Floppy2!";
$c = $a+$b;
Now using the debugger I can see that as soon as $a and $b are initialized I can see their values so if I break at line 2 and do
>p $a
==2
I can see that $a has value 2. But if I break at line 4 I can't see anything in $name
>p $name
==
But once $name is used on line 5 I can then see it :/
Is this some sort of dynamic variable scoping so checking at the method what the object is?
