Help for this page

Select Code to Download


  1. or download this
           split /PATTERN/,EXPR,LIMIT
           split /PATTERN/,EXPR
           split /PATTERN/
           split
    
  2. or download this
    perl -MO=Deparse -ne 'split "foo"'
    LINE: while (defined($_ = <ARGV>)) {
        split(/foo/, $_, 0);
    }
    -e syntax OK
    
  3. or download this
    $ perl -MO=Concise -pe '$_=split "foo"' >1.txt
    -e syntax OK
    ...
    < 6                          </> pushre(/"foo"/) s*/64 ->7
    ---
    > 6                          </> pushre(/"foo"/) s/64 ->7
    
  4. or download this
    $ perl -le 'print "bar\n" =~ /^bar$/ ? "ok" : "not ok"'
    ok