Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Array whitespace

by Belgarion (Chaplain)
on May 20, 2004 at 21:29 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (3)
As of 2025-06-24 17:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.