Let me try again...
I have a directory 1000 text files with names as follows...
If you opened any of files (for example belly above), it would look like this:... barnyard.chiq beach_bum.chiq belly.chiq belly.chiq.20040413103234 belly.chiq.20040417092739 belly.chiq.20040417093935 # <-- Last created file berry.chiq bert.chiq ...
What I'm looking to do is convert & import the last created file for each record into one big .csv file. Each record needs to map to the csv as follows (still using belly):{*JohnDoe* (Saturday, April 10, 2004, 10:41): Belly is a term used to describe a rounded surfboard bottom, when view +ed from the front or rear (not from the side). }
Notes: First column in csv is the title of the file minus the extension. Ideally filenames like "beach_bum" can be converted to "Beach Bum." Third column in csv is date converted to unix timestamp. Fourth column is content b/w the : and the last } -- this text block can have any type of character in it, including quotes, commas, etc.Belly, JohnDoe, 1081593660, "Belly is a term used to describe a rounde +d surfboard bottom, when viewed from the front or rear (not from the +side)."
Again, sorry for the laim first post -- and my $50 contrib to Perl Monks stands...
In reply to Re^2: complex text file to csv
by mpaler
in thread complex text file to csv
by mpaler
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |