Re: References

2014-05-13 Thread Shaji Kalidasan
Dear Mike, There are many benefits of using references. One such advantage is when you pass two arrays to a subroutine. I will illustrate with an example which shows how you can pass two arrays to a subroutine. The first example explains passing arrays without references and the second example ex

Re: References

2014-05-13 Thread Ken Peng
Hi, perldoc perlref has a good description for your questions. http://perldoc.perl.org/perlref.html On Wed, May 14, 2014 at 1:31 PM, Mike Dunaway wrote: > What's a good use of references? When is it ideal to use them? Why would > you want to use them? > > -- > To unsubscribe, e-mail: beginners

References

2014-05-13 Thread Mike Dunaway
What's a good use of references? When is it ideal to use them? Why would you want to use them? -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Increasing a counter while matching against list of given words.

2014-05-13 Thread Mike Dunaway
That makes sense, thanks. On 05/13/2014 01:46 PM, Shlomi Fish wrote: Hi Mike, please reply to the list. On Tue, 13 May 2014 12:49:42 -0500 Mike Dunaway wrote: Actually, can you tell me what's going on here: my %words_lookup = (map { $_ => 1 } @words_to_look_for); I build a hash called %w

Re: Increasing a counter while matching against list of given words.

2014-05-13 Thread Shlomi Fish
Hi Mike, please reply to the list. On Tue, 13 May 2014 12:49:42 -0500 Mike Dunaway wrote: > Actually, can you tell me what's going on here: > > my %words_lookup = (map { $_ => 1 } @words_to_look_for); > I build a hash called %words_lookup whose keys are the entries of @words_to_look_for and

Re: How to make a key of a hash read only

2014-05-13 Thread Dr.Ruud
On 2014-05-12 10:59, Satya Prasad Nemana wrote: I have requirement to make the key of a perl hash to be read only so that no other function can modify it. The keys are already read-only. -- Ruud -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: begi

Re: Increasing a counter while matching against list of given words.

2014-05-13 Thread Mike Dunaway
Thanks, I'll look into this and give it a try. On 05/13/2014 03:08 AM, Shlomi Fish wrote: Hi Mike, On Tue, 13 May 2014 02:36:30 -0500 Mike Dunaway wrote: Hello everyone. Let's say I have a user provide @list of words and I want to match each words against a file or a another @list of words a

Re: Increasing a counter while matching against list of given words.

2014-05-13 Thread Shlomi Fish
Hi Mike, On Tue, 13 May 2014 02:36:30 -0500 Mike Dunaway wrote: > Hello everyone. Let's say I have a user provide @list of words and I > want to match each words against a file or a another @list of words and > increase a counter every time a word in the given list appears in what > I'm match

Increasing a counter while matching against list of given words.

2014-05-13 Thread Mike Dunaway
Hello everyone. Let's say I have a user provide @list of words and I want to match each words against a file or a another @list of words and increase a counter every time a word in the given list appears in what I'm matching against, what might a possible solution look like for that? The only t