Help for this page

Select Code to Download


  1. or download this
    $record = 'A;B;C;D';
    
  2. or download this
    $second_field = (split ';', $record)[1];
    
  3. or download this
    A;B
    #foo;B;ar
    ;B
    
  4. or download this
    if($record =~ m/^.;(.);.;.$/) {
      $second_field = $1;
    }