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

Hello there, Can someone help me with this task: You know in Linux, that there is a HAL daemon who can detect when you connect new hardware to your system. Well i will use that, but i need to know when the device is connected. Is there a way to complete this task with perl. Is there a way to catch some kind of interruption or signal and to run the script to get the data from the connected device.

Replies are listed 'Best First'.
Re: perl - detect device connected
by davorg (Chancellor) on Nov 08, 2006 at 11:00 UTC
Re: perl - detect device connected
by gellyfish (Monsignor) on Nov 08, 2006 at 13:14 UTC

    On Linux you would typically be using hotplug, there is no reason why you shouldn't be able to write an 'agent' in Perl as far as I can see, or alternatively you could run a Perl program from an existing 'agent' script.

    /J\