I think it's because this is getting parsed as:
my $x = '2D6-324'; print(split('-',$x)) ," complete\n";
so you're printing the split, and the "executing" the text. If you turned on warnings, you'd see "Useless use of a constant in void context". Either add another () enclosing all you want to print, or get rid of the () around split.
-- Dan
In reply to Re: split question
by zigdon
in thread split question
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |