You are using split() to split a line into three parts. The error message tells you that $freq has the undefined value, which is what happens if there are not enough parts to split the line into. The error message also tells you that this happens with line 1 (i.e. the first line) of the file you are reading. So presumably line 1 of the file has only one ' ' and therefore only two parts.
When something like this happens, it is useful to add a line "use Data::Dumper;" to the beginning of your script and a line like "print Dumper(\$line,\$header,\$tag,\$freq);" inside your loop. Start the script and look at the first line. This will help you in debugging even more complicated bugs
In reply to Re: Error message "Use of uninit"
by jethro
in thread Error message "Use of uninit"
by bluray
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |