Tanktalus,

my ($id_name, $filename, $last_name, $first_name, $alignment, $generic_class_name, $class_name, $generic_race, $race, $gender, $experience, $strength, $dexterity, $constitution, $intelligence, $wisdom, $charisma) = qw(test) x 17; is just a placeholder, and will be gone in the final code as will all the Data::Dumper stuff since it isn't doing me any good at the moment.

I have read, reread, and reread Text::CSV and Text::CSV_XS, and they do not tell me what I need to know, how to use the data once I get it. I tried to bind the columns, and that didn't work. I am at my wits end trying to make this work. I just don't get what Text::CSV is doing.

I can't even figure out why tie %csv, qw(Tie::IxHash); doesn't work.

I have written the two hashes in two ways, and they don't work.

%general_information = ( "class(es)" => $csv{"class_name"}, alignment => $csv{"alignment"}, race => $csv{"race"}, gender => $csv{"gender"}, ); %ability_scores = ( strength => $csv{"strength"}, dexterity => $csv{"dexterity"}, constitution => $csv{"constitution"}, intelligence => $csv{"intelligence"}, wisdom => $csv{"wisdom"}, charisma => $csv{"charisma"}, ); %general_information = ( "class(es)" => $csv->{class_name}, alignment => $csv->{alignment}, race => $csv->{race}, gender => $csv->{gender}, ); %ability_scores = ( strength => $csv->{strength}, dexterity => $csv->{dexterity}, constitution => $csv->{constitution}, intelligence => $csv->{intelligence}, wisdom => $csv->{wisdom}, charisma => $csv->{charisma}, );

I am missing a big piece of this puzzle and don't know what it is.

Have a nice day!
Lady Aleena

In reply to Re^2: How to set variable names using Text::CSV? by Lady_Aleena
in thread How to set variable names using Text::CSV? by Lady_Aleena

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.