相关代码 |
|
程序清单15-6:count1.pl #!/usr/bin/perl #Change Variables $count = 'count.dat'; ############################################## open (COUNT, "$count")||die("Can't open count.dat\n"); $counter = ; close (COUNT); open (COUNT, ">$count"); $counter += 1; print COUNT "$counter"; @indivual = split(//, $counter); foreach $number (@indivual) { $output = "$number"; print $output; } close (COUNT);
相关资源 |
|