diff options
author | Elvin Aslanov <rwp.primary@gmail.com> | 2022-08-30 11:53:57 +0400 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2022-08-30 09:30:26 -0600 |
commit | ce789034b8334f0287b20cd30ee2b8859ec79ca9 (patch) | |
tree | 109dc688a62f4615d182dd6af71b9fb7051788a7 /lib/File | |
parent | 4622e102066ac6c21fa38a6622b883eed7e7ed9e (diff) | |
download | perl-ce789034b8334f0287b20cd30ee2b8859ec79ca9.tar.gz |
[doc] Update File::Copy synopsis
Add `my` to examples for better practice.
Diffstat (limited to 'lib/File')
-rw-r--r-- | lib/File/Copy.pm | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/File/Copy.pm b/lib/File/Copy.pm index ce659a0203..39bc23656b 100644 --- a/lib/File/Copy.pm +++ b/lib/File/Copy.pm @@ -23,7 +23,7 @@ sub syscopy; sub cp; sub mv; -$VERSION = '2.39'; +$VERSION = '2.40'; require Exporter; @ISA = qw(Exporter); @@ -339,14 +339,14 @@ File::Copy - Copy files or filehandles use File::Copy; - copy("sourcefile","destinationfile") or die "Copy failed: $!"; - copy("Copy.pm",\*STDOUT); - move("/dev1/sourcefile","/dev2/destinationfile"); + copy("sourcefile", "destinationfile") or die "Copy failed: $!"; + copy("Copy.pm", \*STDOUT); + move("/dev1/sourcefile", "/dev2/destinationfile"); use File::Copy "cp"; - $n = FileHandle->new("/a/file","r"); - cp($n,"x"); + my $n = FileHandle->new("/a/file", "r"); + cp($n, "x"); =head1 DESCRIPTION |