Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
P is for Practical
 
PerlMonks  

Re: Array whitespace

by Belgarion (Chaplain)
on May 20, 2004 at 17:29 UTC ( [id://355089]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Array whitespace

Are you simply trying to print the output of the ypcat command? If so, try the following code:

open PASSWD, "ypcat passwd|"; while (<PASSWD>) { print; } close PASSWD;

Your current code is stringifying a list which does something like:

join(' ', @list);

One final answer, if you change your last line to:

print @nis_passwd;

(notice without the double quotes), the extra space will be removed.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://355089]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.