Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    use strict;
    ...
    
    delimiter ' '
    <Bart><Lisa><Maggie><Marge><Homer>
    
  2. or download this
      As a special case, specifying a PATTERN of space
      ("' '") will split on white space just as "split"
    ...
      leading whitespace produces a null first field.  A
      "split" with no arguments really does a 
      "split(' ', $_)" internally.
    
  3. or download this
    perl -MO=Deparse -e '$_=" a b c ";print map {"<$_>"} split'
    $_ = ' a b c ';
    print map({"<$_>";} split(" ", $_, 0));