I want to add @]@[ before each cell in excel how can do this with perl. I almost got it to work!! It worked fine with comma except then all my white spaces are gone...
Code:
$filename = "Bok1.prn";
$filename2 = "bok2.txt";
open ( FILE, $filename) or die "Cannot open file: $!";
print "file open for editing\n";
while ( $line = <FILE> ) {
$line =~ s/^(.*)/\@\[$1/;
$line =~ s/^(.*)/$1\@\]/;
$line =~ s/ /\@\]\@\[ /ig; # here is the problem..
push(@outLines, $line);
}
close FILE;
open ( OUTFILE, ">$filename2" );
print ( OUTFILE @outLines );
close ( OUTFILE );