John W. Krahn wrote:
>> change:
>>
>> @users = ;
>>
>> to:
>>
>> chop(@users = );
>
>
> You should use chomp unless you are stuck in Perl4.
>
agree. chomp is safer(and faster than chop).
david
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED
David wrote:
>
> Darren Wanner wrote:
>
> > Simple add user script:
> >
> > #!/usr/bin/perl
> >
> > open(FILE,"users.log");
> > @users=;
> > foreach $users (@users) {
> > `useradd -g 201 -d /userhome/$users -m $users`;
> > }
> > print "done.\n";
>
> change:
>
> @users = ;
>
> to:
>
> chop(@u
In message <[EMAIL PROTECTED]>
Darren Wanner <[EMAIL PROTECTED]> wrote:
>
> I'm trying to write a simple script that takes a list of users from a file
> and creates a user account for them, using the useradd script. The system
> I'm doing this on is Solaris 8. When I run the script I
Darren Wanner wrote:
>
> I'm trying to write a simple script that takes a list of users from a file
> and creates a user account for them, using the useradd script. The system
> I'm doing this on is Solaris 8. When I run the script I get the following
> error. It seems as if it's not accepting
Darren Wanner wrote:
> Simple add user script:
>
> #!/usr/bin/perl
>
> open(FILE,"users.log");
> @users=;
> foreach $users (@users) {
> `useradd -g 201 -d /userhome/$users -m $users`;
> }
> print "done.\n";
change:
@users = ;
to:
chop(@users = );
and try again.
david
--
To unsubscribe,