Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

(d4vis)Re: Perl is a black diamond language?

by d4vis (Chaplain)
on Nov 29, 2000 at 23:22 UTC ( [id://43983]=note: print w/replies, xml ) Need Help??


in reply to Perl is a black diamond language?

My boss came to me yesterday and asked if he knew of a way to 'clean up' the passwd file on our mail server. He basically just wanted a list of all the email accounts. I said 'no problem' and whipped up a quick script to sort alphabetically, pull just the username and Name fields, and ignore the system-level accounts. As an added bonus I gave him a list of all accounts that had bad group ID's or bad comment fields and made it all look purty with format.
It took me about 20 minutes.

This is the reason sysadmins like me use Perl. I am almost the platonic form of the "casual programmer". I may never build anything over 50 lines in my entire career, but Perl saves me time and effort every single day.
Is it dangerous? Maybe, but big deal, I break stuff all the time, and if I break it with the chainsaw I can fix it with duct tape.

I think Perl just excels as a tool for the casual programmer.

~monk d4vis
#!/usr/bin/fnord

Replies are listed 'Best First'.
Re: (d4vis)Re: Perl is a black diamond language?
by tilly (Archbishop) on Nov 30, 2000 at 05:25 UTC
    I suggest looking at getpwent. This will work even if your code some day has to deal with things like nis...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://43983]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2024-03-29 06:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found