in reply to Accepting either a filename or a handle

Look at the source code for File::Copy::copy, where it determines whether or not the arguments passed are handles.
  • Comment on Re: Accepting either a filename or a handle