in reply to Why is my result empty?
Hi, I am trying to use strict perl coding for this simple task, but my variable returns empty. Why?
Because you're not Coping with Scoping (you're not Lexical scoping like a fox)
Consider this program, then ask yourself why you do this in your program
$ perl -le " use warnings; use strict; my $one = 1; { my $one = 2; pri +nt $one; } print $one; " 2 1
what am I missing?
Sample input (and sample output) portion of How do I post a question effectively?
|
|---|