Kevin Pfeiffer wrote:
>
> In article <[EMAIL PROTECTED]>, Rob Dixon wrote:
>
> > Kevin Pfeiffer wrote:
> >>
> >> I would have thought that this would initialize my $indent variable to 2
> >> (like setting an initial state for an object), but if I call "indent()" I
> >> get nothing back. :-(
> >>
>
In article <[EMAIL PROTECTED]>, Rob Dixon wrote:
> Kevin Pfeiffer wrote:
>>
>> I would have thought that this would initialize my $indent variable to 2
>> (like setting an initial state for an object), but if I call "indent()" I
>> get nothing back. :-(
>>
>>
>> { # static local variable
>>my
Kevin Pfeiffer wrote:
>
> I would have thought that this would initialize my $indent variable to 2
> (like setting an initial state for an object), but if I call "indent()" I
> get nothing back. :-(
>
>
> { # static local variable
>my $indent = 2;
>
>sub indent {
> my $increment = sh
Kevin Pfeiffer wrote:
>
> In article <[EMAIL PROTECTED]>, Rob Dixon wrote:
>
> > Kevin Pfeiffer wrote:
> >>
> >> I would have thought that this would initialize my $indent variable to 2
> >> (like setting an initial state for an object), but if I call "indent()" I
> >> get nothing back. :-(
> [...]
Kevin Pfeiffer wrote:
>
> I would have thought that this would initialize my $indent variable to 2
> (like setting an initial state for an object), but if I call "indent()" I
> get nothing back. :-(
>
>
> { # static local variable
>my $indent = 2;
>
>sub indent {
> my $increment = sh
In article <[EMAIL PROTECTED]>, Rob Dixon wrote:
> Kevin Pfeiffer wrote:
>>
>> I would have thought that this would initialize my $indent variable to 2
>> (like setting an initial state for an object), but if I call "indent()" I
>> get nothing back. :-(
[...]
> Well yes, it will, but only when you
On Oct 26, Kevin Pfeiffer said:
>> {
>> my $indent = 2;
>>
>> sub indent {
>> my $increment = shift;
>> $indent += $increment if $increment;
>> return $indent;
>> }
>> }
>
>Hmmm, I guess I would have to move it up or add a "BEGIN" label.
Using a BEGIN block isn't a bad idea; jus