in reply to Re^2: Using Tie::Dir
in thread Using Tie::Dir

"... the documentation doesn't mention that ..."

Tie::Dir is over 21 years old (latest release [v1.02]: 26 Apr 1996). There's quite a few things that its documentation tells you, or omits to tell you, that you should probably change (beyond the bareword issue you've already encountered).

You appear to be using strict, which is very good: keep doing that. You should use lexical variables, that aren't shown in the documentation, or strict will complain about that.

In addition, wherever it shows code like:

new Tie::Dir arg1, ...;

You should change that to:

Tie::Dir::->new(arg1, ...);

See "perlobj: Invoking Class Methods" for a discussion of why you should do this.

— Ken