Hi,
I am attempting to read in a CSV file, modify certain arrays and output it into a new file. It works fine on a mac, however on Windows it does not do anything. Any ideas what im doing wrong? Code posted below;
open(FILE,"file.csv") or die $!;
open(TARGET,"> newfile.csv") or die $!;
while($line = <FILE>){
chomp($line);
next unless($line =~ m/\S+/);
@array = split("‰",$line);
if ($array[3] == 2)
{
$array[3] = "Read";
}
$line = join("‰",@array);
print TARGET $line ."\n";
}
close FILE;
close TARGET;
Thank you for your help,
Tango