这个人有我.
这有效:
print "Processing Feed\n";
while ( my @p = $mainex->fetchrow_array ) {
    my $iis = "$pcount";
    print "$iis\n";
    # ... Do Other Stuff Here
    $pcount++;
}
这使:
Processing Feed
1
2
3
4
5
6
7
8
9
10
...
这不起作用(从第4行中删除\n):
print "Processing Feed\n";
while ( my @p = $mainex->fetchrow_array ) {
    my $iis = "$pcount";
    print "$iis";
    # ... Do Other Stuff Here
    $pcount++;
}
这只是给出了:
 Processing Feed
我正在尝试构建一个计数器,它将使用以下内容输出记录的计数:
while( Something ){
    print "\b\b\b\b\b\b\b\b\b\b\b";
    print "$count";
    $count++;
    # Do stuff here
}
任何想法,为什么当第二个例子中没有\n时,没有什么是打印到屏幕?我以前做了很多次,无法弄清楚它为什么不起作用.
| 归档时间: | 
 | 
| 查看次数: | 81 次 | 
| 最近记录: |