Just a hunch (my hunch was wrong, see Update below), but try removing the single quotes from the filehandles in your open() and close() statements.
Change this:
open( 'USERS' , 'file' );
To this:
open( USERS , 'file' );
and while we're at it, let's check the results of the open:
open(USERS, 'file') or die "unable to open `file': $!";
Update: my hat's off to tye on the use of a string literal for a filehandle. How many times have I glossed over the following in perlfunc and not noticed?
If FILEHANDLE is an expression, its value is
used as the name of the real filehandle wanted.
I suppose what threw me is that I've seen no examples of literal strings used to specify filehandles. Live and learn.
In reply to Re: RPC
by converter
in thread RPC
by Necos
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.