in reply to Re^2: print copy source and destination
in thread print copy source and destination

What do you actually want printed? Print and copy are orthogonal operations - I don't understand how it makes sense to "put the print command directly into the copy command" unless you mean to modify the copy sub to print its parameters.

if you want a modified copy sub you could:

sub myCopy { my ($source, $target) = @_; print "Copying from $source to $target\n"); return © }

Perl reduces RSI - it saves typing

Replies are listed 'Best First'.
Re^4: print copy source and destination
by JavaFan (Canon) on Oct 01, 2008 at 23:31 UTC
    If you want an "invisible" wrapper (useful for instance if the 'copy' function uses Carp), replace the 'return' by 'goto'.