See. split, perlre and perlop for more info on the behaviour above.$_ = 'index.html'; print( (split /\./)[0], $/, /^([a-z]+)\./, $/); __output__ index index
_________
broquaint
update: changed to grabbing before the dot (i.e not extension)
In reply to Re: a small help in split
by broquaint
in thread a small help in split
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |