Re: Editing a file....

2002-09-20 Thread William McKee
On 19 Sep 2002 at 18:48, Greg Schiedler wrote: #!/usr/bin/perl # $username=$ARGV[0]; $password=$ARGV[1]; $newpassword=$ARGV[2]; # perl -pi -e 's/^($username)(\s+.*)($password)(.*)$/${1}${2}$newpassword${4}/' users-file.txt You're already in perl so you don't need to call it again.

Editing a file....

2002-09-19 Thread Greg Schiedler
I found this code snipit listed below that will edit a users file in place. It works great via the command line. I'm trying to pass the arguments to the script named edit.pl and it will not work if called via a system call ie: system (perl -pi -e