networkguy
Technical User
I am a Perl newbie so be easy on me! I have an array of multiple records (user_header1.txt) which looks something like:
name; color; groups; auth_method; internal_password;
111-13-3009 ;Foreground; {fwadmins};undefined;dd;
(where the 1st line is a header and the records follow.)
I am trying to replace an internal_password field of the record and save the change to the same file. When I'm running the script below, it obviously overwrites the record with just name and password. How can I change that particular field while preserving the rest of the records???
open(USERS, "> user_header1.txt"
;
print USERS "name;\tinternal_password;\n";
print USERS "$uid;\t$new_passwd1;\n";
close (USERS);
name; color; groups; auth_method; internal_password;
111-13-3009 ;Foreground; {fwadmins};undefined;dd;
(where the 1st line is a header and the records follow.)
I am trying to replace an internal_password field of the record and save the change to the same file. When I'm running the script below, it obviously overwrites the record with just name and password. How can I change that particular field while preserving the rest of the records???
open(USERS, "> user_header1.txt"
print USERS "name;\tinternal_password;\n";
print USERS "$uid;\t$new_passwd1;\n";
close (USERS);