in reply to Re: Snarky comments on the ddj perl quiz (nein)
in thread Snarky comments on the ddj perl quiz

Nonsense!
open KAREN, ">sw"; is a correct, if unfortunate, answer to the question "Which of the following commands should be used to open a filehandle named KAREN to an existing file named sw?"
Assuming you have to choose one, and don't prefer a syntax error to success.

Replies are listed 'Best First'.
Re^3: Snarky comments on the ddj perl quiz (nein)
by clinton (Priest) on Aug 23, 2007 at 09:01 UTC

    Update I misread the question for the third time, and thought it was trying to open a filehandle to an existing fileHANDLE, not an existing file.

    The correct way to open a filehandle to an existing filehandle is to duplicate it:

    open KAREN, ">&sw"

    Clint