Greetings,
I'm trying to increment the UID field of the unix password file from an
csv file. I've tried to insert C style increment and it keeps bomping
out. What would be the logic to increment the 5009 to increment by
one? Thanks for any help.
-Overkill
#!/usr/bin/perl
#use strict;
#use warnings;
while (<DATA>) {
chomp;
($first, $last, $username) = split(",");
print "$username:x:5009:4001:$first
$last:/home/$username:/bin/false\n";
}
exit;
__DATA__
"Bob","Ahrary","bahrary"
"Jill","Anderson","janderson"
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/