in reply to Re: Learning Perl Chap 2 Win32::FileSecurity Help
in thread Learning Perl Chap 2 Win32::FileSecurity Help

The code is probably commented out because it would't work. $! is magical and so setting its value in that way would have no effect (similar to how the data stored in a scalar is ignored while the scalar is tied).

The proper approach would be to just call SetLastError(...) which makes the error information available in $^E (which might not have been the case when this module was written).

- tye        

  • Comment on Re^2: Learning Perl Chap 2 Win32::FileSecurity Help ($^E)

Replies are listed 'Best First'.
Re^3: Learning Perl Chap 2 Win32::FileSecurity Help ($^E)
by BrowserUk (Patriarch) on May 09, 2006 at 17:27 UTC

    Fair enough. Though inserting return would make more sense than always croaking.


    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?
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.