#!/usr/bin/perl $file = "myfile.txt"; open(FP, "< $file") || die "cannot open file : $file"; while($line = <FP>) { print $line; }
#!/usr/bin/perl if ($#ARGV != 1) { print "Usage $0 source dest\n"; exit(1); } $source = $ARGV[0]; $dest = $ARGV[1]; open(SOURCE_FP, "< $source") || die "cannot open file : $file"; (-e $dest) && die "Oops! A file called '$dest' already exists.\n"; open(DEST_FP, "> $dest") || die "cannot open file : $dest"; while($line = <SOURCE_FP>) { print DEST_FP $line; } print "Copy Cussess : $source => $dest\n";
Copyrights © - Joinc, All Rights Reserved. Inherited From - Yundream Rebranded By - Joonphil
open
권한
예제
단순 읽기
파일 복사
Recent Posts
Archive Posts
Tags