At 04:25 PM 7/1/02 +0200, David vd Geer Inhuur tbv IPlib wrote:

>Hi,
>
>Does anyone know how to make it a one-liner ??
>
>@regel = split(/ /, `ypmatch IPlib auto.setuser`);
>chomp @regel;

"One-liners" are allowed to contain multiple statements.  Of course, 
there's always

@regel = split(/ /, `ypmatch IPlib auto.setuser`) and chomp @regel;

I don't know what the output of ypmatch looks like, but it seems odd 
that the array after the split could contain terminal newlines.  But 
still, this answers your question:

@regel = split(/\n? /, `ypmatch IPlib auto.setuser`);

>If anyone has suggestion to use NIS within Perl that is welcome also 
>(with examples :).

Did you check out the Net::NIS modules on CPAN?

--
Peter Scott
Pacific Systems Design Technologies
http://www.perldebugged.com/


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to