Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copying files 1

Status
Not open for further replies.

Kasd2002

Programmer
Dec 10, 2002
4
DE
Hi.
I have a problem i dont know how to solve.
I want to copy one file to another, but only one part of it is it copied.....
The file is quite long.....should this be the reason?
 
use perl's File::Copy

Code:
use File::Copy;

copy ($file1, $file2) || die "can not copy, $!";

or use qx/cp $file1 $file2/ though the former method is better (being platform independent and h4x0r proof) ---
cheers!
san
pipe.gif


"The universe has been expanding, and Perl's kind of been expanding along with the universe" - Larry Wall
 
Thanks 133camel!!!
In the meantime i found the proble (i think) the file was not properly closed, so the content was truncated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top