I have this code below:
my $file = 'c:\test.log';
open (FILE, "<", $file) or die $!;
my @list = grep /\bAdobe\b/, <FILE>;
my $days;
foreach (@list) {
$days = $_;
print "$days\n";
}
Expected Result is:
"Adobe","10:10:10, 11/10/2011","Ready"
I want to split the result by comma with this code below:
my @sample = split(',', $days);
Expected Result is:
"Adobe"
"10:10:10
11/10/2011"
"Ready"
but it's not what I wanted to do.
I want to print the output like this:
"Adobe"
"10:10:10, 11/10/2011"
"Ready"
How could I achieve this without using/installing any module like Text::CSV?