fork 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(?=\s+)/, $string);
  7. print $_."\n" foreach @spt;
Success #stdin #stdout 0.03s 6788KB
stdin
Standard input is empty
stdout
'som,ething' another 'thin'g' 'her,e' gggh*