perl - Using the File::Copy to copy a file -


i'm trying out simple program copy file. program dies error.

the code i'm trying is:

#! /usr/bin/perl -w  use file::copy #my $source = "1.txt"; #my $dest = "copy.txt"; copy("1.txt","copy.txt") or die"copy failed $!\n"; 

and error message is:

syntax error @ 3.pl line 5, near ") or" execution of 3.pl aborted due compilation errors.

you're missing semicolon ;

use file::copy; 

Comments

Popular posts from this blog

assembly - 8086 TASM: Illegal Indexing Mode -

Java, LWJGL, OpenGL 1.1, decoding BufferedImage to Bytebuffer and binding to OpenGL across classes -

asp.net - Configuring WCF Services in Code WCF 4.5 -