Writing output to a file
am 19.06.2008 02:12:36 von 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/
Re: Writing output to a file
am 19.06.2008 19:45:31 von yitzle
On Wed, Jun 18, 2008 at 8:12 PM, 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 ???
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/
Re: Writing output to a file
am 19.06.2008 19:48:44 von 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/