Okay, I'm still struggling.  <sigh>  I just cannot seem to get my mind to
stop, look, and listen.  Here's some code I'm working on:

------------------------- 8-< --------------------------------------------
use strict;
my %cmdLine;
my $DBG = 1;

while (<DATA>) {
        chomp;

        my ($adx, $rest) = (split(/\:/,$_));
        if ($DBG) {print "\$adx=\t<$adx>\n\$rest=\t<$rest>\n";}

        while ($rest ne "") {
                my ($opt, $arg, $newRest) = ($rest =~ /\s*([\-a-z]*)\s+([^ 
]*)\s+(.*)/);
                $rest = $newRest;
                $cmdLine{$opt} = $arg;
        }
}

__DATA__
ten-me-900: -r timbu -x me-900 -h ten-me-900
hidit: -r tenbu -x networks-users -h hidit
postal: -x direct -h postal
pickit: -h pickit -x uncrp -r oakd

------------------------- 8-< --------------------------------------------

Why doesn't the while loop iterate all of $rest?  I can't seem to figure 
out how to get the loop to act on the entire $rest, and get it into the 
hash.  

What am I doing wrong?

Thanks,

d





-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to