Help for this page

Select Code to Download


  1. or download this
    my $split_pattern = ' ';
    
  2. or download this
    my @x = split $split_pattern, $line;
    
  3. or download this
    my $split_pattern;
    ...
    my @x = defined($split_pattern)
            ? split $split_pattern, $line
            : split ' ', $line;
    
  4. or download this
    my @x = split defined($split_pattern)?$split_pattern:' ', $line;