From: Bruce W. <wi...@ch...> - 2005-01-29 23:10:57
|
Dominique Benoliel wrote: > Hello, i would like to generate dynamically the states of a Voice_Cmd > command. > > Something like... > > $list_states= 'tempout, tempin'; > ... > $str_states= 'Email [' . $list_states. '] weather chart'; > $weather_graph_email = new Voice_Cmd $str_states; I tried your example here and it worked ok: my $list_states= 'tempout, tempin'; my $str_states= 'Email [' . $list_states. '] weather chart'; $weather_graph_email = new Voice_Cmd $str_states; Note I had to put 'my' in front of the vars you define. Maybe that was your problem? This uses a bit less code: my $list_states= 'tempout, tempin'; $weather_graph_email = new Voice_Cmd "Email [$list_states] weather chart"; Bruce |