Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    my $var   = 'abcd,ef,,ghijkl,mnop';
    
    print "$1\n" while $var =~ /$regex/g;
    
  2. or download this
    18:27 >perl 827_SoPW.pl
    abcd
    ...
    mnop
    
    18:27 >
    
  3. or download this
    use strict;
    use warnings;
    ...
    my @matches = split /,/, $var;
    
    $_ && print "$_\n" for @matches;