
maclarensg
New User
Sep 5, 2008, 3:24 AM
Post #1 of 2
(2340 views)
|
# Send the request to the server and retrieve the response. my $resp = $chan->send($request); foreach my $client ($resp->{list}){ print $client->{$name}; } --------------------------------------------------------- my above code, $resp->{list} is an array. But why can't I use a foreach. below is the error I've got [dcs@dcs ~]$ sudo ./listallclients.pl Global symbol "@client" requires explicit package name at ./listallclients.pl line 23. Global symbol "$name" requires explicit package name at ./listallclients.pl line 23. Execution of ./listallclients.pl aborted due to compilation errors.
|