in reply to Regex confusion
my @line_array = split /\s+/,$p->{cmd}; my $procType = $line_array[0]; my $procName = $line_array[2];
if you want to use a regular expression you could change it to (untested): /(\w+)\s+[^\s]+\s+(\w+)\s+[^\s]+\w+\s+[^\s]+(\w+)/
which is vastly more complicated than with just a split. Note, that the + after the \s is only necessary if there is a chance there is more than whitespace character in those locations.
-enlil
|
|---|