in reply to Re: Re: Replicate open() and close()
in thread Replicate open() and close()

Declared as: sub myopen (*;$)

Careful... The example in the docs won't do what you are asking for. It will complain about calling myopen() with 3 arguments. If you want it to act like perl's open(), use the same prototype that perl does. That's *;$@ as I pointed out in my reply to Fletch.

perl -le 'sub myopen(*;$){print@_}myopen(FOO,"<","bar")' Too many arguments for main::myopen at -e line 1, at end of line Execution of -e aborted due to compilation errors.
-sauoq
"My two cents aren't worth a dime.";