Help for this page

Select Code to Download


  1. or download this
    sub devices_for {
        my ( $thing ) = @_;
        my @subs = query( $thing );
        return map { /^DEVICE\d+/ ? $_ : devices_for( $_ ) } @subs;
    }
    
  2. or download this
    sub devices_for {
        my ( $thing ) = @_;
        return $thing if $thing =~ /^DEVICE\d/;
        return map { devices_for( $_ ) } query( $thing );
    }
    
  3. or download this
    sub devices_for {
        return ( $_[0] =~ /^DEVICE\d/ )
            ? $_[0]
            : map { devices_for( $_ ) } query( $_[0] );
    }