摘要: 1. index 函数 index 主要用于字符串查找,返回从左->右查到子字符串的起始位置(起始位置0) ,可以带括号,也可以不带。当找不到会返回-1使用方法: index STR,SUBSTR,POSITION index STR,SUBSTR实例:#!/usr/bin/perluse strict;my $str1="Love me, love my dog\n";print "return the first child string location\n";print index $str1,"ove";print & 阅读全文
posted @ 2013-06-16 00:05 to be crazy 阅读(1365) 评论(0) 推荐(0) 编辑