in reply to Problem with Split function

Read the documentation for split. The first argument to split is a regular expression. A dot has a special meaning in a regular expression. To use it as a real dot you need to escape it.

--
<http://www.dave.org.uk>

"The first rule of Perl club is you do not talk about Perl club."
-- Chip Salzenberg

Replies are listed 'Best First'.
Re^2: Problem with Split function
by Wampa (Hermit) on Jul 28, 2004 at 09:14 UTC

    This is corect and work.

    @field = split(/\./,$script); $script = $field[0]

    Thanks

    Programing in Embperl and all questions are related to Embperl.
    Excuse my bad English !!!