Loop condition
while ($line =~ /(\d+)\s+(\w+)/) { ... }
will produce infinite loop. Use /g regex modifier to extract all pairs:
while ($line =~ /(\d+)\s+(\w+)/g) { ... }
In reply to Re^2: creating a hash from a text file.
by AnomalousMonk
in thread creating a hash from a text file.
by changma_ha
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |