First, it is not
use strict; which enables these
warnings, but rather
-w. Anyway, I agree with your
theory that it must be the print statements trying to use variables without values.
There are a couple of things you should be aware of in this code.
First, you try to print out all the values each time you
have read a line from the file. This will of course generate warnings about
the use of uninitialized values.
Second, you should probabely use a datastructure to hold your data.
As it stands now, you will only get the last record of data, and it will not
be correct. It will probabely contain data from earlier records.
A reasonable datastructure to use in this case might possibly
be to use a hash of hashes
%data = (user1 => { "User-Service" => "Framed-User",
"Framed-Protocoll" => "PPP",
# etc...
},
user2 => { ... }
);
Autark.
In reply to Re: strict
by autark
in thread strict
by toadi
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.