
Stefanik
User
Dec 3, 2012, 2:08 AM
Post #1 of 5
(3422 views)
|
Split file content
|
Can't Post
|
|
Hi to all, I'm new here. I've a little problem with a perl script. I have a file with many information. with ":" in it. For example: word1Line1:word2Line1:word3Line1 word1Line2:word2Line2 .... I should have an output file with Word splitted each for new line: word1Line1 word2Line1 word3Line1 <separator> word1Line2 word2Line2 I try to split it with following loop, without any output:
open (myfile, 'test.log'); while (<myfile>){ $SplitVar = split (':', <myfile>); } print $SplitVar; close (myfile);
|