On May 18, 2005, at 7:55, Aditi Gupta wrote:

is guess_alphabet a predefined function in the following code?

    my @counters = ();
    while (my $row = <$fh>) {
        my @cols = split /\s*-\s*/, $row;
        for (my $i = 0; $i < @cols; ++$i) {
            my $code = guess_alphabet($cols[$i]);
            ++$counters[$i]{$code};
        }
    }

it was giving errors..

Yes, before that code there was this paragraph:

If an "alphabet" can have a stringfied representation, a code for
example, and if given a $col we imagine for the sake of this followup
a function that guesses $col's alphabet code:

my $code = guess_alphabet($col);

You have to plug there whatever you need according to the actual problem, guess_alphabet was a convenience imaginary subroutine to be able to depict the main algorithm in a few lines.


-- fxn


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to