Help for this page

Select Code to Download


  1. or download this
    my ($last_name, $first_name, $middle_initial) = ( $_ =~ /(\w+)\W*?(\w+
    +)\s?(\w)?/) ;
    
  2. or download this
    sub parse_name {
        my ($last, $first, $mi) = ( $_[0] =~ /(\w+)\W*?(\w+)\s?(\w)?/) ;
        return [$first, $last, $mi];
    }