Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^2: printing out users without home directories

by haukex (Abbot)
on May 16, 2018 at 06:31 UTC ( #1214613=note: print w/replies, xml ) Need Help??


in reply to Re: printing out users without home directories
in thread printing out users without home directories

for(@passwd_entries) { print "/home/$_ ...

In the context of the code from the root node, that won't work, since $_ contains the entire line from the entry.

Replies are listed 'Best First'.
Re^3: printing out users without home directories
by syphilis (Chancellor) on May 16, 2018 at 08:24 UTC
    ... that won't work, since $_ contains the entire line from the entry

    Yes, the wording of the OP's initial post led me to believe that his @passwd_entries contained nothing but a list of the usernames - though, of course, the OP didn't exactly specify that was the case.

    Cheers,
    Rob

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1214613]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2018-07-22 01:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (451 votes). Check out past polls.

    Notices?