PerlZealot has asked for the wisdom of the Perl Monks concerning the following question:

Would Perl's "system" function be considered a "callback"?

Replies are listed 'Best First'.
Re: quick amateurish question
by ikegami (Patriarch) on Oct 22, 2008 at 20:47 UTC

    A callback function is a function you pass to another function, such as visitor in the following example:

    $tree->visit(\&visitor);

    Since you can't get a reference to system, you can't pass a reference to system, so you couldn't use it as a callback even if it made sense to do so.

Re: quick amateurish question
by Fletch (Bishop) on Oct 22, 2008 at 21:14 UTC

    Not by foldoc's definition (or any common definition I'm aware of), no.

    The cake is a lie.
    The cake is a lie.
    The cake is a lie.

quick amateurish answer
by JavaFan (Canon) on Oct 22, 2008 at 20:47 UTC
    No.
Re: quick amateurish question
by Illuminatus (Curate) on Oct 22, 2008 at 20:48 UTC
    I don't think your question makes sense. A 'callback' is something supported by an application. It is function provided via an API that will be invoked when some condition is met.
      I think maybe I am lacking in my understanding of what a callback is...