Hi

I am a newbie to Perl , I was reading through one of the beginner level books on perl. I did not understand the concept of "Callbacks" and i have the following questions on it:

1. What are they ?

2. Why do we need them ?

3. What useful purpose do they achieve ?

I was reading the following code to understand it but could not comprehend.

*Code:*

#!/usr/bin/perl
use warnings;
use strict;
use File::Find;
find ( \&callback, "/");

sub callback {
print $File::Find::name, "\n";
}

*End Of Code:*

Thanks
Jatin

Reply via email to