fork(1) download
  1. #!/usr/bin/perl
  2. use strict;
  3. use warnings;
  4. use Data::Dumper;
  5. my $string = q{'som,ething', another, 'thin'g', 'her,e', gggh*};
  6. my @spt = split(/,(?=\s+)/, $string);
  7. print $_."\n" foreach @spt;
Success #stdin #stdout 0.02s 7248KB
stdin
Standard input is empty
stdout
'som,ething'
 another
 'thin'g'
 'her,e'
 gggh*