
Serja
New User
Aug 14, 2013, 12:27 PM
Post #1 of 3
(2335 views)
|
Remove 8 characters from the begining of a line
|
Can't Post
|
|
I want to remove the first 8 characters from a file on EACH line. It would be like: example test 1 2 3 4 5 example test 1 2 3 4 5 example test 1 2 3 4 5 To return: test 1 2 3 4 5 test 1 2 3 4 5 test 1 2 3 4 5 Hoping to see just an example of this if that's ok. Thanks! while ($data = <INFILE>){ $data =~ s/\^,/\^/; if (substr ($data, 0, 7) eq 'ITEMINT') { $data =~ s/,,//; } print OUTFILE $data; }
|