Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hello, I seem to be using the variable $title incorrectly with the copy function. Nothing copies. Does the variable need single quotes or something?
Any Ideas
Thanks

copy("/u/web/dom/ref/$title","/u/web/dom/add/$title")or die "copy failed: $!";

Replies are listed 'Best First'.
Re: need help with copy
by pg (Canon) on Nov 23, 2002 at 04:52 UTC
    No, you cannot use single quot, otherwise $title will not be resovled. Make sure the file and both directories do exist.
      The title should have been need help with sleep. After I posted I realized I forgot the use File::Copy; line.

      Thanks for your help and hope I can help sometime.