Help for this page

Select Code to Download


  1. or download this
    use warnings;
    use strict;
    ...
    my @matches = split m/(,)/, $test;
    
    print "Item $_ is >$matches[$_]<\n" for 0..$#matches;
    
  2. or download this
    Test string: >,124,456,7890<
    Item 0 is ><
    ...
    Item 4 is >456<
    Item 5 is >,<
    Item 6 is >7890<