Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Questions with sysopen (code)

by Thelonius (Priest)
on Sep 19, 2002 at 19:35 UTC ( [id://199272]=note: print w/replies, xml ) Need Help??


in reply to Questions with sysopen (code)

The immediate problem is this line:
foreach my $readLine (PASSWD) {
Perhaps you meant something like <PASSWD>?

However, you should never do this:

truncate (PASSWD, 0);
with an important file like passwd! What you do is write a new file that has the changes you want and then mv the new file over the old file.

Replies are listed 'Best First'.
Re: Re: Questions with sysopen (code)
by RMGir (Prior) on Sep 19, 2002 at 19:38 UTC
    ...after cp'ing the old file to passwd.bak, just in case your script REALLY screws up...
    --
    Mike

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2024-04-19 23:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found