Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Error message "Use of uninit"

by Not_a_Number (Parson)
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);

to:

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";


Comment on Re: Error message "Use of uninit"
Select or Download Code
Re^2: Error message "Use of uninit"
by bluray (Sexton) on Nov 21, 2011 at 22:08 UTC
    Hi,

    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?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://939306]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (8)
As of 2014-08-28 04:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (256 votes), past polls