i'm new to tcl and familiar with perl
i prob where i have to count the number of phone
by user
example
JOHN: 234-4534
JOHN: 234-1212
SARAH: 567-3434
SARAH: 646-1212
ALICE: 234-2342
if perl i
can do
while (<>) {
$COUNTPHONE{$1}++ if /^(\S+): /;
}
how can i do the same thing in TCL
THX
i prob where i have to count the number of phone
by user
example
JOHN: 234-4534
JOHN: 234-1212
SARAH: 567-3434
SARAH: 646-1212
ALICE: 234-2342
if perl i
can do
while (<>) {
$COUNTPHONE{$1}++ if /^(\S+): /;
}
how can i do the same thing in TCL
THX