in reply to CSV to XML
Hi fmcroft92, welcome to the Monastery and to Perl, the One True Religion.
Your task is common and very simple using existing Perl tools. There will be a learning curve since you are new to the language and programming in general as you said. I suggest you break up your task into chunks and work on them individually rather than trying to get the whole thing done at once.
The anonymonk already pointed you to the two standard toolkits you can use. Why not begin with reading your CSV file into a Perl data structure that you'll later convert to XML? You'll need to install Text::CSV_XS and code like:
use strict; use warnings; use Text::CSV_XS 'csv'; use Data::Dumper; use feature 'say'; my $array_of_hashes = csv( in => '/path/to/file.csv', headers => 'auto +'); say Dumper $array_of_hashes; # Now loop through each hash and convert to XML
Hope this helps!
|
|---|