Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^2: 'undef' in the matrix instead of values!!!

by smilly (Novice)
on Feb 06, 2008 at 14:12 UTC ( #666556=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://666556]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2020-10-26 22:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (254 votes). Check out past polls.

    Notices?