Jun 11, 2018, 11:23 AM
Post #5 of 6
That would actually make it slightly harder!
Re: [Bill_Koz] easy way to convert text file data in column to one row
[In reply to]
chomp( my @lines = <> );
printf "[%s],[%s],[%s]\n", @lines;
C:\Users\Bill\forums\guru>perl Bill_Koz.pl Bill_Koz.txt >one_line.txt
This should get you started. Its good enough for a one-time task, but you stated that this will be run monthly. A more professional version would open and close the files in perl rather than depending on the shell. It should also test for all likely errors, and take appropriate action. It is far easier to deal with these issues now than it to deal with your boss after someone else's mistake causes YOUR program to destroy a valuable file.