#!usr/bin/perl -w use strict; use CGI; my $res = "aaaaubbbbuooooo"; my @rest = split /u/,$res; my $restLength = @rest; print "Content-type: text/html\n\n"; print "restLength : $restLength\n"; for (my $i=0;$i< @rest;$i++){ print "@rest[$i]\n"; } __END__ restLength : 3 aaaa bbbb ooooo