Re: [Perl-unix-users] parsing user command & parameter text: using split with space as the delimeter

2006-12-05 Thread $Bill Luebkert
listmail wrote: > $command =~ s/(".*) (.*")/$1:$2/g; Try something like: $command =~ s/("[^"]+) ([^"]+")/$1:$2/g; ___ Perl-Unix-Users mailing list Perl-Unix-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

[Perl-unix-users] parsing user command & parameter text: using split with space as the delimeter

2006-12-05 Thread listmail
#!/usr/bin/perl -w use strict; use warnings; #the problem started with using split with the space delimeter #this code only demonstrates my attempts to respect quoted strings #while a user enters space separated commands and parameters #command usage: adduser userid password fullname location acce