Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re: Error message "Use of uninit"

by Not_a_Number (Prior)
on Nov 21, 2011 at 19:33 UTC ( #939306=note: print w/replies, xml ) Need Help??

in reply to Error message "Use of uninit"

Since, at least in your posted snippet, you don't use the variables $tag or $freq, perhaps the best way of avoiding the warning would be to change the line

my($header,$tag,$freq)=split(' ', $line);


my ( $header, @rest ) = split ' ', $line;

Update (thanks AnomalousMonk): And of course you would have to change your output line to:

print $FILE2 "$header\t@rest\n";

Replies are listed 'Best First'.
Re^2: Error message "Use of uninit"
by bluray (Sexton) on Nov 21, 2011 at 22:08 UTC

    Thanks for the reply. Though it worked well in resolving the "uninitiated value", the output as I opened in spreadsheet have only 2 columns (2nd and 3rd column got crammed into the 2nd column separated by space).

    Anyway, I resolved the problem by changing the format of the heading line. Header,"Tag" "Frequency" was changed to "Header" "Tag" "Frequency"

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://939306]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (4)
As of 2018-06-20 02:48 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (116 votes). Check out past polls.