in reply to substring exists at particular postion?
my $bigStr = 'Once upon a time there was a little programer'; my $littleStr = 'time'; my $neededPos = 12; my $length = 4; if (substr($bigStr, 12, $length) eq $neededStr) { &do_something; } else { &do_somthing_else; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: substring exists at particular postion?
by joealba (Hermit) on May 23, 2002 at 13:11 UTC |