in reply to Using File::Tail with name_changes

From File::Tail:

Instead of trying to implement various clever detection methods, File::Tail will call the code reference defined in name_changes. The code reference should return the string which is the new name of the file to try opening.
You're using a sub call name_changes => &change and you should be using a code ref: name_changes => \&change (note the backslash).

Replies are listed 'Best First'.
Re^2: Using File::Tail with name_changes
by softcraft (Initiate) on Aug 03, 2007 at 00:49 UTC
    Thanks, it's working now!
Re^2: Using File::Tail with name_changes
by softcraft (Initiate) on Aug 04, 2007 at 17:49 UTC
    I got another problem when I use strict refs. The error came out was "Can't use string as a symbol ref while "strict refs" in use. It came from the ref used in name_changes=>\$change. Is there alternative to this?
      Is \$ a typo? It was supposed to be \& -- a backslash followed by an ampersand. I don't see how that (or any of code in your OP) would give you that error message though.

        Thanks.. I have just noticed the typo and it works fine now.