in reply to File protection in a called script

If that is your code exactly, no wonder there's a problem. Of course if you use strict; and perl -w, you'll probably find what's wrong.

Replies are listed 'Best First'.
Re: Re: File protection in a called script
by TrinityInfinity (Scribe) on Nov 15, 2002 at 19:11 UTC
    I do use strict and -w, it produces no warnings regarding the file opening/writing.
      Then you should copy and paste your actual code instead of the above, which has an obvious bug: you are opening $current instead of $file.