Ok bare with me, ok.
I have a program that writes values created to two different files, "pass" and "userlog" as it happens. The program works perfectly apart from the this message that appears in "userlog", with the data appended to it. I'm aware that this error message appeared because I have warnings turned on. But what I want to no is how to fix the problem:
Use of uninitialized value in join or string at reg.cgi line 166 (#1) (W uninitialized) An undefined value was used as if it were already de +fined. It was interpreted as a "" or a 0, but maybe it was a mistake. To suppress this warning assign a defined value to your variables. To help you figure out what was undefined, perl tells you what operati +on you used the undefined value in. Note, however, that perl optimizes your program and the operation disp +layed in the warning may not necessarily appear literally in your pro +gram. For example, "that $foo" is usually optimized into "that " . $foo, and + the warning will refer to the concatenation (.) operator, even thoug +h there is no . in your program.
Heres the code for the error:
open USRNF,">>$file" or die "Couldn't find user file $file, Perl s +ays $!\n"; print USRNF join "#", @info; #Line 166 Error = "#" print USRNF "\n"; close USRNF; open PASS,">>$pass" or die "Coundn't find user file $pass, Perl say +s $!\n"; print PASS $user_name; print PASS "\\"; print PASS &encryption($password); print PASS "\n"; close PASS;
Thanks, Eoin..

In reply to Perl says $!what??? by eoin

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.