note
Lady_Aleena
<p>[choroba], could you please include where you got the headings/headers? You used the method <c>new()</c> instead of the function <c>csv()</c>. Since <c>new()</c> doesn't have a header option, I don't know where the headers are invoked if they are <i>not</i> the first line of the file being parsed.</p>
<p>As for the secondary <c>new()</c> splitting (or whatever does it) at <c>;</c>, that would be triggered whenever a header has a <c>+</c> at the end of it (and the <c>+</c> being removing from the header after parsing). So, for example, my movies.txt has the following headers...</p>
<code>
'headers' => ['title','start year','end year',qw(media format+ Wikipedia allmovie IMDb TV.com Flixster genre+ source company)],
</code>
<p><c>format</c> and <c>genre</c> would be parsed at the <c>;</c> while all other fields are strings.</p>
<p>So for a file where I only want a key-value pair for each line, it looks like I will have to put in 2 headers, and if the second one has a <c>+</c> it is to be parsed with the value being split (or whatever) on the <c>;</c>.</p>
<p>I gravitated directly to <c>csv()</c> because it looked easier to use than <c>new()</c> since I could not figure out what did what. Like what makes an array of hashes and what makes a hash of hashes (what I use mostly). The whatchamacallits (like getline, parse, etc) are not grouped together in such a way as to make it obvious to me.</p>
<p>So, would you please expand the code so I can see everything you are doing? I am a bit lost.</p>
<div class="pmsig"><div class="pmsig-161890">
<div><strong><em>No matter how hysterical I get, my problems are not time sensitive. So, relax, have a [id://1026423|cookie], and a very nice day!</em></strong></div>
<div><em>Lady Aleena</em></div>
</div></div>
1192516
1192526