in reply to Snarky comments on the ddj perl quiz

You didn't notice that they provided no correct answer to question 9?

- tye        

  • Comment on Re: Snarky comments on the ddj perl quiz (nein)

Replies are listed 'Best First'.
Re^2: Snarky comments on the ddj perl quiz (nein)
by ysth (Canon) on Aug 23, 2007 at 01:22 UTC
    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.

      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