in reply to Upper case and chomp
It returns the total number of characters removed from all its arguments.This means you are using that incorrectly. Rather than using eq, I would suggest using a regular expression, like
where $ will ignore a trailing newline in reporting a match.my @listaccountlocked = split("=", $accountlocked); if ($listaccountlocked[1] =~ /^true$/i) { system("chuser account_locked='false' $username"); print(`lsuser -a account_locked $username`); } else { print("\nThe account $username is not locked\n\n"); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Upper case and chomp
by roboticus (Chancellor) on Feb 10, 2011 at 15:22 UTC | |
by kennethk (Abbot) on Feb 10, 2011 at 17:09 UTC | |
by ikegami (Patriarch) on Feb 10, 2011 at 19:12 UTC | |
by roboticus (Chancellor) on Feb 10, 2011 at 22:57 UTC | |
by hbm (Hermit) on Feb 10, 2011 at 16:12 UTC | |
by ikegami (Patriarch) on Feb 10, 2011 at 19:02 UTC |