go ahead... be a heretic | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
i can recommend using perlsub, "Private Variables via my()".
just quoting from there:
The "my" operator declares the listed variables to be lex- you're doing something like but $inner is only seen in "scope if" and "scope else". no variable $inner has ever been defined in "scope file". so just add a my $inner; before your if/else-stataments. additionally your logic doesn't make sense to me. you say, if condition1, set the variables to something, if condition2, set them to something else, and otherwise don't set them, but print them. but if they aren't set the print seems pretty useless and will issue a warning. there are also fine tutorials here in the tutorials section about my(), strict etc. where you might find answers. In reply to Re: using strict
by tinita
|
|