From: Douglas A. P. <do...@ge...> - 2002-10-19 16:02:06
|
Try this instead: my $room = shift; my $name = "\$" . "$room" . "_Motion"; my $check = &get_object_by_name($check) my $state = $check->{state}; --doug On Sat, 2002-10-19 at 10:00, Tim Doyle wrote: > Hi guys: > > I can't seem to figure out how to do this in perl. Perhaps someone could > help me? :-) > > I have several X10_Items with names such as $Garage_Motion. I have another > variable named $room which will contain "Garage" or any other of my room > names. How do I access the current state of $Garage_Motion based upon the > value in $room. Here's the unworking code that I currently have: > > > my $room = shift; > my $check = "\$" . "$room" . "_Motion"; > my $state = lc $$check->{state}; > > > Thank you, > > Tim Doyle > > > > > ------------------------------------------------------- > This sf.net email is sponsored by: > Access Your PC Securely with GoToMyPC. Try Free Now > https://www.gotomypc.com/s/OSND/DD > ________________________________________________________ > To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365 > > > |