On Wednesday 16 Jun 2010 23:29:31 little_help wrote: > Is there a way to change all entries for a current username with a new > username? I have two files (A and B for the sake of argument). File > A has all the current names in the passwd map and file B has the new > names. For example > File A File B > Foo Foo123 > Bar Bar1234 >
Are File B's usernames given in the same order as File A's? You can read from several (lexical preferably) filehandles - see perldoc perlopentut. > I need to change all entries in File A with the entries in File B. > > ORIGINAL FILE > foo:xxxx:111:222:Foo User:/home/foo:/bin/ksh > > NEW FILE > foo123:xxxx:111:222:Foo User:/home/foo123:/bin/ksh > > I need some type of loop that will perform an exact match and run > through both files? Any help would be appreciated. Regards, Shlomi Fish -- ----------------------------------------------------------------- Shlomi Fish http://www.shlomifish.org/ Optimising Code for Speed - http://shlom.in/optimise God considered inflicting XSLT as the tenth plague of Egypt, but then decided against it because he thought it would be too evil. Please reply to list if it's a mailing list post - http://shlom.in/reply . -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/