home *** CD-ROM | disk | FTP | other *** search
/ ftp.cse.unsw.edu.au / 2014.06.ftp.cse.unsw.edu.au.tar / ftp.cse.unsw.edu.au / pub / doc / languages / perl / nutshell / ch4 / rindex < prev    next >
Encoding:
Text File  |  1992-10-18  |  124 b   |  6 lines

  1. $pos = length($string);
  2. while (($pos = rindex($string, $lookfor, $pos)) >= $[) {
  3.     print "Found at $pos\n";
  4.     $pos--;
  5. }
  6.