Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Array whitespace

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


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
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2023-03-21 08:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which type of climate do you prefer to live in?






    Results (59 votes). Check out past polls.

    Notices?