There are multiple ways to do a file slurp: http://sites.google.com/site/oleberperlrecipes/recipes/05-io/02-slurp-a-file personaly I prefer:...
So, What did you add to the subject msmani_1980?
Did you like this? look to the new version: http://sites.google.com/site/oleberperlrecipes/recipes/02-io/05-give-some-color-to-external-program
This post has become a Recipe at my new Perl website....
for getting the prime number try http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes No devisions in here
for(j=2;j<=sqrt(i);j++) :cryin: is similar to for(j=2;j*j <= i;j++) :p so, no sqrt in here since it is really slow. At least...
Lets time this use Benchmark qw(:all) ; sub in_array_pradeep { my ($arr,$search_for) = @_; my %items = map {$_ => 1} @$arr; return...
can I suggest other implementation? sub in_array { my ($arr,$search_for) = @_; return grep {$search_for eq $_} @$arr; } or...
Off course? Depends on the problem that you are using. Try to use allot of: - multiple derivation with virtual methods - allocation...
Correct to: ## HASH REFERENCE my $hash_ref = {}; # reference to an empty hash And add dereference: my $copy = %$hash_ref;...
In Java you just have references/pointer :disappoin The the question of the C versus C++ First of all remerber the history of the first...
This is ridiculous :mean: C++ isn't faster or better then Java 5 or 6 in many cases: -> If you need to use virtual methods, the base of any...
you are correct. Sory from my side One suggestion, if you can: When we are writing a comment, we should have this tutorial at side of the...
Good work ;) but one small comment :p: Why having int and unsigned int? Just for coherence, and avoiding compilers work: /* Recursive...
Separate names with a comma.