Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: join string in 2D array

by roboticus (Chancellor)
on May 03, 2019 at 12:13 UTC ( [id://1233315]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    for ( my $c= 0; $c<= $#clk_output; $c++) {
       for ( my $d = 0; $d <= $#{$clk_output[$c]}; $d++ ) {
    ...
        }
    }
    print Dumper \@clk_new;
    
  2. or download this
    $VAR1 = [ 'ux_prim_clk', 'ux_prim_clk', 'ux_prim_clk',
              'ux_side_clk', 'ux_side_clk', 'ux_side_clk',
              'ux_xtal_frm_refclk', 'ux_xtal_frm_refclk',
              'ux_xtal_frm_refclk', 'ux_xtal_frm_refclk'   ];
    
  3. or download this
    for ( my $c= 0; $c<= $#clk_output; $c++) {
        $clk_new = join '_', @{$clk_output[$c]};
        push @clk_new, $clk_new;
    }
    print Dumper \@clk_new;
    
  4. or download this
    $VAR1 = [ 'ux_prim_clk', 'ux_side_clk', 'ux_xtal_frm_refclk' ];
    
  5. or download this
    for my $c (@clk_output) {
        $clk_new = join '_', @$c;
        push @clk_new, $clk_new;
    }
    
  6. or download this
    for my $c (@clk_output) {
        push @clk_new, join '_', @$c;
    }
    
  7. or download this
    for (@clk_output) {
        push @clk_new, join '_', @$_;
    }
    
  8. or download this
    @new_list = map { operation_to_perform_on_each_element } @old_list;
    
  9. or download this
    @clk_new = map { join '_', @$_ } @clk_output;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1233315]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2024-04-25 04:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found