Update: > sub mysplit { > my ($orig, $pat, $limit) = @_; > $pat = qr/\s+/ unless ref($pat) eq 'Regexp'; > $limit ||= 0; > print "orig = <$orig>\n"; > print "pat = <$pat>\n"; > print "limit = <$limit>\n"; > $DB::single = 1; > print join ':' => split($pat, $orig, $limit); > print "\n\n"; > } It works if you replace the 'join' line with: eval 'print join ":" => split($pat, $orig, $limit);'; die $@ if $@; (That idea came from seeing the correct debugger output and thinking that it must do an eval to get there.) Marcel -- We are Perl. Your table will be assimilated. Your waiter will adapt to service us. Surrender your beer. Resistance is futile. -- London.pm strategy aka "embrace and extend" aka "mark and sweep"Thread Previous