Bookmarks

Yahoo Gmail Google Facebook Delicious Twitter Reddit Stumpleupon Myspace Digg

Search queries

docmd.close 2585, WWWXXXAPC, WWWXXXDOCO, nu vot, dhcpd lease file "binding state", WWWXXXDOCO, how to setup procmail to process html2text, how to setup procmail html2text, WWWXXXAPC., XXXCNZZZ

Links

XODOX
Impressum

#1: Writing output to a file

Posted on 2008-06-19 02:12:36 by dakin999

Hi, I am trying to write the script myself and now stuck at some
thiong that I am pretty sure have been done by others. Any help will
be significant.

Ok, I have created an array and now I want to read from this array the
elements and put them in a LDIF format. Something like this:

dn: uid=xxx,cn=zzz,O=xyz,C=OO
objectClass: inetOrgPerson
objectClass: organizationalPerson
objectClass: person
objectClass: top

I am trying to work with "sprintf" in perl, but struggling with the
correct syntax for the output to be like above.

Any help ???


--
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org
http://learn.perl.org/

Report this message

#2: Re: Writing output to a file

Posted on 2008-06-19 19:45:31 by yitzle

On Wed, Jun 18, 2008 at 8:12 PM, dakin999 <akhilshri@gmail.com> wrote:
> Hi, I am trying to write the script myself and now stuck at some
> thiong that I am pretty sure have been done by others. Any help will
> be significant.
>
> Ok, I have created an array and now I want to read from this array the
> elements and put them in a LDIF format. Something like this:
>
> dn: uid=xxx,cn=zzz,O=xyz,C=OO
> objectClass: inetOrgPerson
> objectClass: organizationalPerson
> objectClass: person
> objectClass: top
>
> I am trying to work with "sprintf" in perl, but struggling with the
> correct syntax for the output to be like above.
>
> Any help ???

Can you be more detailed about what data you have and what you want to do?
The subject mentions writing to a file. Yet the post discusses regular
printing (eg STDOUT). Which would you like help with?

--
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org
http://learn.perl.org/

Report this message

#3: Re: Writing output to a file

Posted on 2008-06-19 19:48:44 by romdav

On Jun 18, 7:12 pm, akhils...@gmail.com (Dakin999) wrote:
> Hi, I am trying to write the script myself and now stuck at some
> thiong that I am pretty sure have been done by others. Any help will
> be significant.
>
> Ok, I have created an array and now I want to read from this array the
> elements and put them in a LDIF format. Something like this:
>
> dn: uid=xxx,cn=zzz,O=xyz,C=OO
> objectClass: inetOrgPerson
> objectClass: organizationalPerson
> objectClass: person
> objectClass: top
>
> I am trying to work with "sprintf" in perl, but struggling with the
> correct syntax for the output to be like above.
>
> Any help ???

maybe this helps

sprintf("n: uid=%s,cn=%s,O=%s,C=%s",$var1,$var2,$var3,$var4);
http://perldoc.perl.org/functions/sprintf.html

David Romero


--
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org
http://learn.perl.org/

Report this message