As my first real script in perl, I would to parse a LDIF file (export format
of an LDAP directory) to get some sort of information of it. The structure
of such a file is something like this (between quotes) :
"
name: bozo
surname: the clown
address: over here
name: denise
surname: richard
addres
I've made a script that looks like this
"
#!/usr/bin/perl -w
use Net::LDAP::LDIF;
use Net::LDAP::Entry;
$file= $ARGV[0];
open(LDIF, $file) || die "Failed to open file $ARGV[0] : $!";
$ldif = Net::LDAP::LDIF->new(LDIF);
while (not $ldif->eof()) {
$entry = $ldif->read_entry();
};
"
Perl is
I have a problem with a regular expression :
I process a text file with a list of names.
I would like to reformat names like
Francois de la Varenne
Macha Meril
BuzzMac Cormack
(there must be at least two words in the name)
to something like this :
[EMAIL PROTECTED]
[EMAIL PROTECTED]
AIL PROTECTED]]
> Sent: Wednesday, September 18, 2002 2:47 PM
> To: Panel Vincent - A53
> Subject: Re: Regexp
>
>
> > I have a problem with a regular expression :
> >
> > I process a text file with a list of names.
> >
> > I would like to refor
> > On Wed, 18 Sep 2002, Panel Vincent - A53 wrote:
> >
> > > I have a problem with a regular expression :
> > >
> > > I process a text file with a list of names.
> > >
> > > I would like to reformat names like
> > >
> > >