in reply to Re^2: WWW::Curl help
in thread WWW::Curl help

The best phrase I can think of to describe what a callback is is this well known snippet ;-) :

Don't call us, we call you

A callback is a subroutine that isn't called directly by some code (the caller), but given as parameter to some other code/subroutine/process (the called), which eventually calls (back) that subroutine.

Look at sort() in perl. The comparision function you can give to sort is essentially a callback. You never call it yourself, sort calls it when it needs to. Callbacks are most commonly used in window managers where the callbacks react to asynchronous events like key presses and mouse clicks.

Replies are listed 'Best First'.
Re^4: WWW::Curl help
by zentara (Cardinal) on Aug 22, 2008 at 15:00 UTC
    best phrase

    I heard this title of a jazz song lastnight.....

    "If You See Kay"

    if ( uc( k){ \&callback }

    Oh...Fridays :-)


    I'm not really a human, but I play one on earth Remember How Lucky You Are