相关疑难解决方法(0)

如何使用'printf'打印'%'字符?

我无法弄清楚的简单问题......

如何在printf字符串中打印'%'字符?下面的代码打印出来,但也会出现"无效转换"错误.

printf "\t\t".$hour."00 HRS\t=>\t%.2f\t%.2f\t%.1f\%\n", $total, $max15, ($max15/$total*100);
Run Code Online (Sandbox Code Playgroud)

应输出如下内容:

        0000 HRS    =>    3125.19    898.02    28.7%
Run Code Online (Sandbox Code Playgroud)

perl printf

8
推荐指数
3
解决办法
2万
查看次数

标签 统计

perl ×1

printf ×1