Data::Random::WordList man page on OpenServer

Man page or keyword search:  
man Server   5388 pages
apropos Keyword Search (all sections)
Output format
OpenServer logo
[printable version]

Random::WordList(3)   User Contributed Perl Documentation  Random::WordList(3)

NAME
       Data::Random::WordList - Perl module to get random words from a word
       list

SYNOPSIS
	 use Data::Random::WordList;

	 my $wl = new Data::Random::WordList( wordlist => '/usr/dict/words' );

	 my @rand_words = $wl->get_words(10);

	 $wl->close();

DESCRIPTION
       Data::Random::WordList is a module that manages a file containing a
       list of words.

       The module expects each line of the word list file to contain only one
       word.  It could thus be easily used to select random lines from a file,
       but for coherency's sake, I'll keep referring to each line as a word.

       The module uses a persistent filehandle so that there isn't a lot of
       overhead every time you want to fetch a list of random words.  However,
       it's much more efficient to grab multiple words at a time than it is to
       fetch one word at a time multiple times.

       The module also refrains from reading the whole file into memory, so it
       can be safer to use with larger files.

METHODS
       new()

       Returns a reference to a new Data::Random::WordList object.  Use the
       "wordlist" param to initialize the object:

       o   wordlist - the path to the wordlist file.  If a path isn't sup-
	   plied, the wordlist distributed with this module is used.

       get_words([NUM])

       NUM contains the number of words you want from the wordlist.  NUM
       defaults to 1 if it's not specified.  get_words() dies if NUM is
       greater than the number of words in the wordlist.  This function
       returns an array or an array reference depending on the context in
       which it's called.

       close()

       Closes the filehandle associated with the word list.  It's good prac-
       tice to do this every time you're done with the word list.

VERSION
       0.05

AUTHOR
       Adekunle Olonoh, koolade@users.sourceforge.net

COPYRIGHT
       Copyright (c) 2000 Adekunle Olonoh. All rights reserved. This program
       is free software; you can redistribute it and/or modify it under the
       same terms as Perl itself.

SEE ALSO
       Data::Random

perl v5.8.8			  2003-02-22		   Random::WordList(3)
[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server OpenServer

List of man pages available for OpenServer

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net