Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re: File Naming

by jlp (Friar)
on Aug 01, 2000 at 05:39 UTC ( #25384=note: print w/replies, xml ) Need Help??

in reply to File Naming

This should do the job:
my $user = "User"; open(USER, ">$user.txt") || die "Can't create user file $user.txt: $!" +; print USER "foo";#user data goes here

This assumes you have the proper write permissions on your server of course.

Replies are listed 'Best First'.
RE: Re: File Naming
by elusion (Curate) on Aug 01, 2000 at 06:08 UTC
    Keep in mind that you may not want to store a "plain" password in that file. If you are going to have passwords in the file you may want to use the crypt function to encrypt the password before storing it in the file. You won't be able to decrypt it, but you'll be able to encrypt it after they enter their password and check it against the version in the text file.

    - p u n k k i d
    "Reality is merely an illusion, albeit a very persistent one." -Albert Einstein

Log In?

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2023-12-08 03:52 GMT
Find Nodes?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?

    Results (35 votes). Check out past polls.