Jav*_*oob 2 perl text underline
有没有办法给文本下划线是一个perl 输出脚本?我已经阅读了多个来源,但脚本中的文本不能加下划线。
错误输出:全局符号“$finalAddition”需要在 C:\Documents and Settings\PCS\Desktop\Perl Scripts\script.pl 第 7 行的显式包名称。
脚本代码:
#!/usr/bin/perl
use warnings;
use strict;
use Term::ANSIColor;
$finalAddition = 8;
print "\n\nThe Final Number after addtion would be ".coloured($finalAddition, 'bold 
underline');
请就此提出一些建议。谢谢。
小智 5
这可能与变量范围和启用严格模式有关,而不是您要实现的目标。更改在代码中添加“我的”会改变什么吗?
#!/usr/bin/perl
use warnings;
use strict;
use Term::ANSIColor;
my $finalAddition = 8;
print "\n\nThe Final Number after addition would be " .
      colored($finalAddition, 'bold underline');