当前位置:网站首页 > Perl编程 > 正文

perl基础-9 (Perl编程24学时教程)

#!usr/bin/perl -w $string = "one fish, two fish , three fish"; $start = -1; while (($start = index($string, "fish",$start))!= -1) { print $start; print "\n"; $start++; } print rindex($string, "fish"); print "\n"; print substr($string ,4), "\n"; print substr($string ,4, 4), "\n"; print substr($string ,4,-1), "\n"; print substr($string ,-10), "\n"; print "replace\n"; substr($string ,0,0) = "some"; print $string;

到此这篇perl基础-9 (Perl编程24学时教程)的文章就介绍到这了,更多相关内容请继续浏览下面的相关推荐文章,希望大家都能在编程的领域有一番成就!

版权声明


相关文章:

  • 24学时掌握Perl编程_perl编程实例2024-11-16 12:00:06
  • Perl编程探索:深入理解数组变量2024-11-16 12:00:06
  • perl编程实例_scratch趣味编程100例2024-11-16 12:00:06
  • perl编程实例_C语言编译软件2024-11-16 12:00:06
  • 不要学习“网红”编程语言2024-11-16 12:00:06
  • Gtk2-perl编程:控件编程2024-11-16 12:00:06
  • perl编程必会_perl语言入门pdf2024-11-16 12:00:06
  • 推荐Perl编程最好的学习参考系列用书2024-11-16 12:00:06
  • perl编程语言_c语言编程题库2024-11-16 12:00:06
  • perl -x_perl命令2024-11-16 12:00:06
  • 全屏图片