Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

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

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (2)
As of 2023-05-28 18:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?