![]() |
|
Perl Monk, Perl Meditation | |
PerlMonks |
Re: Comparison between keys in hashby i5513 (Pilgrim) |
on Jul 06, 2011 at 14:49 UTC ( #912989=note: print w/replies, xml ) | Need Help?? |
Really you should switch to use strict and use warnings Here is your code rewritten in 'pure perl', with this notes: - my @xx= $str =~ /(xxx)/g # return array with matches - scalar @xx # how many items are in @xx - you should add use strict your self to the script - it is not needed to go to #arr in the loop - I really doesn't understand what you want to say in the last paragraph, so my code is only a guess See perlretut for more info in first note PD to perlmonks admins: I really hate to have add <br> in every line :( when I'm commenting or posting
In Section
Seekers of Perl Wisdom
|
|