Help for this page

Select Code to Download


  1. or download this
    ($stamp,$extra,$orth,$a,...$z) = split(/ <|>;|\t/, $line1);
    #splitting all of the information after the first ";" into 2 scalars;
    $split = "$a ... $z";
    ($canon,$spoke) = split(/; /, $split);
    
  2. or download this
    # split into two scalars and an array:
    
    ...
    
      ( $field1, $field2, $rest ) = split( /$separators/, $input_string, 3
    + );
    
  3. or download this
    # wrong:  ( @fields, $comment ) = split( /[\t#]/, $input_string );