I have a simple subroutine which will accept a device name and state as parameters, and then needs to set the device to that state:
sub setdev {
  my ($devname, $devstate) = @_;
This doesn't seem to work since misterhouse is looking for a device named 'devname'.  How can I tell perl to use the value held inside the devname variable?