首页 > 试题广场 >

以下Perl程序的输出是哪个选项? $txt="9865m6

[单选题]

以下Perl程序的输出是哪个选项?

$txt="9865m62";

$txt =~ /\d\d/g;

print "$&,",pos $txt,",";

$txt =~ /\d\d/g;

print "$&,",pos $txt,",";

$txt =~ /\G\d/gc;

print "$&,",pos $txt,",";

$txt =~ /\G\d/gc;

print "$&,",pos $txt,"";

  • 98,3,65,5,65,,9,2

  • 98,2,65,4,65,,9,1

  • 98,3,65,5,65,5,65,5

  • 98,2,65,4,65,4,65,4

what?
发表于 2022-08-23 14:28:20 回复(0)