!/usr/bin/perl -w use strict; #print "please input a string/n"; #my $line = <STDIN>; #print $line; #wirte a file open(FH, ">aa.txt") or die $!; print FH "hello/n";#向文件寫(xiě)入內(nèi)容 print FH "OK/n"; close(FH); #open a file open(FH, "aa.txt") or die $!; my @f = <FH>;#將文件內(nèi)容讀出 print @f; close(FH);
|
新聞熱點(diǎn)
疑難解答
圖片精選