RE: Split input on whitespace

2002-04-04 Thread Bruce Ambraal
ly, you don't need the if() statement by the increment. -Original Message- From: Bruce Ambraal [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 04, 2002 3:00 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Fwd: Split input on whitespace Could you help me...

RE: Split input on whitespace

2002-04-04 Thread Timothy Johnson
, 2002 3:00 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Fwd: Split input on whitespace Could you help me... With the code below (see attached) I tried to do following: Read from STDIN, splits the input in whitespace, and prints the frequency of terms, with each

RE: Split input on whitespace

2002-04-04 Thread Mark Anderson
PROTECTED] Subject: Fwd: Split input on whitespace Could you help me... With the code below (see attached) I tried to do following: Read from STDIN, splits the input in whitespace, and prints the frequency of terms, with each term printed next to its frequency on STDOUT. -- To unsubscribe, e-ma

Fwd: Split input on whitespace

2002-04-04 Thread Bruce Ambraal
Could you help me... With the code below (see attached) I tried to do following: Read from STDIN, splits the input in whitespace, and prints the frequency of terms, with each term printed next to its frequency on STDOUT. --- Begin Message --- Why does my code not write the splitted words t

RE: Split input on whitespace

2002-04-04 Thread Timothy Johnson
Because you don't have any print statements to STDOUT? -Original Message- From: Bruce Ambraal [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 04, 2002 2:43 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Split input on whitespace Why does my code not write the splitted wor

RE: Split input on whitespace

2002-04-04 Thread Mark Anderson
TECTED]; [EMAIL PROTECTED] Subject: Split input on whitespace Why does my code not write the splitted words to STDOUT? #!/usr/bin/perl -w open (OUTPUT, ">ex92.out")||die; my %freq; while (my $line = ) { foreach my $w ( split( /\s+/, $line ) ){ if( exists $freq

Split input on whitespace

2002-04-04 Thread Bruce Ambraal
Why does my code not write the splitted words to STDOUT? #!/usr/bin/perl -w open (OUTPUT, ">ex92.out")||die; my %freq; while (my $line = ) { foreach my $w ( split( /\s+/, $line ) ){ if( exists $freq{$w} ){ $freq{$w}++; }else{ $freq{$w} = 1;