Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: generate list from users first name and name?

by choroba (Canon)
on Sep 14, 2012 at 11:32 UTC ( #993703=note: print w/ replies, xml ) Need Help??


in reply to generate list from users first name and name?

Something like this?

#!/usr/bin/perl use warnings; use strict; while (<DATA>) { chomp; my @names = map lc, split; s/\.// for @names; print join "\t", $_, lc substr($names[0], 0, 1) . $names[-1], lc join '.', @names; print "\n" } __DATA__ Max Maier Jerome Mustermann John Lee Duke Peter F. Smith
Your treatment of the middle names might be different. Also, if there are non-ASCII characters in your users' names, more care is needed. Moreover, you should probably hash the usernames and e-mails and check for duplicates.
لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ


Comment on Re: generate list from users first name and name?
Download Code
Replies are listed 'Best First'.
Re^2: generate list from users first name and name?
by matze77 (Friar) on Sep 14, 2012 at 12:57 UTC
    Wow.
    Thank you alot, thats a great start.
    Special characters are treated manually by search an replace ...
    MH

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (9)
As of 2015-07-08 07:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (96 votes), past polls