in reply to Running System Commands With ""
Again, TIMTOWTDI. I could tell you about using the qq// operator or simply 'single quotes' or \backslashes or the concatenation.operator, but the _best_ way is certainly the list-method of system():
unless( system('adduser' => $username, -g => 100, -s => '/bin/false', -d => "/home/$username", -p => $encrypted_pass, -e => $expiry_date, -c => $realname, )){
See `perldoc -f system`
UPDATE: I've just read Don't try this at home: that's the reason why passing a list to system() is the best way :)
--
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Running System Commans With ""
by John M. Dlugosz (Monsignor) on Sep 11, 2002 at 21:02 UTC | |
by fruiture (Curate) on Sep 12, 2002 at 14:13 UTC | |
by John M. Dlugosz (Monsignor) on Sep 12, 2002 at 15:03 UTC |