From ce789034b8334f0287b20cd30ee2b8859ec79ca9 Mon Sep 17 00:00:00 2001 From: Elvin Aslanov Date: Tue, 30 Aug 2022 11:53:57 +0400 Subject: [doc] Update File::Copy synopsis Add `my` to examples for better practice. --- lib/File/Copy.pm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lib/File') 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 -- cgit v1.2.1