strtok equivalent in perl

Hi All,

Is their any equivalent for strtok (in c) to use in perl script.

Thanks in advance.
JS

I believe the split() function is the same. split() splits a string into a list of tokens:

$foo = 'this is a test';
@tokens = split(/ /,$foo);
print "$_\n" fo @tokens;

output:

this
is
a
test

split - perldoc.perl.org