Help for this page

Select Code to Download


  1. or download this
    for (@DATA) {   # this transforms @DATA, destructive
        $_ = [map {/^\s*(.*?)\s*$/} split ':', $_, 2];
    }
    
  2. or download this
    for (@DATA) {
        printf "FIRST TERM - %s\nSECOND TERM - %s\n", @$_;
    }
    
  3. or download this
    for (@DATA) {
        $_ = join ' ', split;    # normalize whitespace
        $_ = [split /[:\s]/, $_, 2];
    }