Advertisement
Guest User

Untitled

a guest
Sep 25th, 2017
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.26 KB | None | 0 0
  1. # $options is some JSON decoded array of hash'es thing.
  2.  
  3. my $comments;
  4. foreach my $device(@{$options->{'data'}}) {
  5.   if ($device->{'systemname'} eq "XYZ") {
  6.     $comments = $device->{'comments'};
  7.     exit;
  8.   }
  9. }
  10. print $comments;
  11.  
  12. # WHY is $comments empty !?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement