in reply to Re: discussion: What should split( /PATTERN/, EXPR, 0 ) return better?
in thread discussion: What should split( /PATTERN/, EXPR, 0 ) return better?

Do I want anything or something depends on a variable (input).
  • Comment on Re^2: discussion: What should split( /PATTERN/, EXPR, 0 ) return better?

Replies are listed 'Best First'.
Re^3: discussion: What should split( /PATTERN/, EXPR, 0 ) return better?
by stevieb (Canon) on Oct 12, 2017 at 21:53 UTC
    my @results; if ($condition){ @results = split ' ', $pattern, $max; } else { # do something different, or don't }
Re^3: discussion: What should split( /PATTERN/, EXPR, 0 ) return better?
by Anonymous Monk on Oct 12, 2017 at 19:47 UTC

    Do I want anything or something depends on a variable (input).

    Don't you mean dynamic variable?

    See I can say silly stuff too.

    What are your opinion?

    m//atch if you want to match, split if you want to split, or mysplit if neither satisfies thats programming