I think I don't quite understand how split() works. I'm currently working on a script, which reads a db full of raw entries of a dictionary and sorts and converts them into XeTeX format. I use hashes of hashes to store the entries.
The following part of the script should look if there two words seperated by ";", split them, put them in an array @engdict with all of the information that belongs to them.
for $_ (%edict) { # for entries with more than one keyword if ($edict{$count}{english} =~ /;/) { @foo = split (/; /, $edict{$count}{english}); for $_ (@foo) { $engdict[$no] = "\\textbf{".$foo[$_]."}"; print $foo[1]; $engdict[$no] = $engdict[$no]."\\textmd{$dict{$cou +nt}{puma}}"; $engdict[$no] = $engdict[$no]."\\textit{$dict{$cou +nt}{ps}}"; $no++; }; delete $edict{$count}; } else { $count++; }; };
In reply to split() Problem by Omukawa
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |