I'm not going to respond to the general Perl question (this list isn't
for that), but I have to point this out:
>>>>> "Steven" == Steven Clark <[EMAIL PROTECTED]> writes:
Steven> m/(\d+):([0-9,]*):(.*)/;
Steven> $id = $1;
Steven> $temp = $2;
Steven> $name = $3;
No, no, no.
NEVER look at $1 unless it is conditional based on the success of the
match that should have set it. Otherwise, you get the $1 of the
*previous* successful match, and many other undecipherable errors.
This is OK:
if (/(\d+):([0-9,]*):(.*)/) {
$id = $1;
$temp = $2;
$name = $3;
... use variables ...
}
But this is probably preferred:
if (($id, $temp, $name) = /(\d+):([0-9,]*):(.*)/) {
... use variables ...
}
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!