in reply to Re: 'undef' in the matrix instead of values!!!
in thread 'undef' in the matrix instead of values!!!


Suppose that my file name(the codes written), is simmat.pl, then i use it this way: simmat.pl inputcorpus.txt output.txt WordNet::Similarity::res
the measure would be WordNet::Similarity::res
  • Comment on Re^2: 'undef' in the matrix instead of values!!!

Replies are listed 'Best First'.
Re^3: 'undef' in the matrix instead of values!!!
by citromatik (Curate) on Feb 06, 2008 at 14:57 UTC

    You can't include a module into your program just by putting its name in the arguments list. They must be included at compile time by using the use statement or at execution time by using require and import.
    Maybe one way to do what you want could be:

    my $Measure = shift; eval "require $Measure;import $Measure;"; ## Now, luckily you can use it: $Measure->new();
    citromatik
      atually that dosnt matter wid or widout i imported the module... it dosnt work :(
      hey guys im done! debugged cooooollllll:D it works) life rocks:P