in reply to SCALAR output instead of attribute name.
my @attrs = \($nam, $pwd, $uid, $gid, $dsc, $hom, $shl);
You're assigning a refernce to an array into an array. I think what you wanted was:
my @attr = ($nam, $pwd, $uid, $gid, $dsc, $hom, $shl);
You also appear to be attempting to make a symbolic ref when you assign to the hash. Symoblic refs are generally something to be avoided, and in any case will only work with package variables (such as those declared with our) not lexicals (like my vars).
Because we don't allow root logins over ssh, using a module such as Unix::PasswdFile is not an option . . .
----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer
: () { :|:& };:
Note: All code is untested, unless otherwise stated
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: SCALAR output instead of attribute name.
by chromatic (Archbishop) on Dec 18, 2003 at 19:12 UTC | |
|
Re: Re: SCALAR output instead of attribute name.
by !1 (Hermit) on Dec 18, 2003 at 19:23 UTC | |
|
Re: Re: SCALAR output instead of attribute name.
by sschneid (Deacon) on Dec 18, 2003 at 18:45 UTC | |
by hardburn (Abbot) on Dec 18, 2003 at 19:00 UTC |