in reply to Re: Checking status of implicit open (diamond operator)
in thread Checking status of implicit open (diamond operator)

Thank's a lot for your reply! Was exactly what I need ++

Now I have to make sure I'm not trapping the rest of the warnings, any guidance on where to search for info?

  • Comment on Re^2: Checking status of implicit open (diamond operator)

Replies are listed 'Best First'.
Re^3: Checking status of implicit open (diamond operator)
by BrowserUk (Patriarch) on Mar 17, 2005 at 14:55 UTC

    You're localising $^I and @ARGV, localise $SIG{__WARN__} also:

    sub inplace{ my @files = @_; local($^I, @ARGV)=(".bak", $file); # Now i can use <> local $SIG{__WARN__} = sub{ ## Handle open errors here }; while(<>){ local $SIG{__WARN__}; # disable it for loop body # do stuff on $_ print; } }

    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    Lingua non convalesco, consenesco et abolesco.
    Rule 1 has a caveat! -- Who broke the cabal?