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.
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
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |