A
arasu
Hi,
#!/usr/local/bin/perl -w
use strict;
my $x = 'hello goat "world world world" "fox goat"';
my @x = split ( /\s+/, $x );
foreach ( @x )
{
print "$_\n";
}
======================
This splits on space, but expected output is
"string within quotes should not be split."
hello
goat
"world world world"
"fox goat"
#!/usr/local/bin/perl -w
use strict;
my $x = 'hello goat "world world world" "fox goat"';
my @x = split ( /\s+/, $x );
foreach ( @x )
{
print "$_\n";
}
======================
This splits on space, but expected output is
"string within quotes should not be split."
hello
goat
"world world world"
"fox goat"