C
Chad Williams
my $procspeed="state on-line state_begin 1058768026 cpu_type sparcv9
fpu_type sparcv9 clock_MHz 450";
How come this:
$procspeed=~ s/.*\s(\d+)\w*/$1/;
gives me $procspeed=450
but this:
$procspeed=~ s/.*\s(\d+)\w*$/$1/;
matches the whole line?
What's the most efficient way to do this? (get the last word/word of
digits, etc)
TIA
fpu_type sparcv9 clock_MHz 450";
How come this:
$procspeed=~ s/.*\s(\d+)\w*/$1/;
gives me $procspeed=450
but this:
$procspeed=~ s/.*\s(\d+)\w*$/$1/;
matches the whole line?
What's the most efficient way to do this? (get the last word/word of
digits, etc)
TIA