Hi, Here's a snippet of some code from the cookbook. I am trying to understand what $seen{$1} is. ie where did $1 come from, and what is in $seen{$1}, and how is the hash populated? thanks. Radhika ======================== #!/usr/bin/perl
#use strict; #use diagnostics; my %seen = (); my $string ="an apple a day"; foreach $byte (split //,$string) { $seen{$1}++; } print "unique chars are: ", sort(keys %seen), "\n"; ========================= -- It's all a matter of perspective. You can choose your view by choosing where to stand. Larry Wall --- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>