Help for this page

Select Code to Download


  1. or download this
    print NEW if $_, join ' ', @{ $reformat{$_} } for keys %reformat;
    
  2. or download this
    $ perl -e 'my @x = qw{a b}; print if $_ for @x'
    syntax error at -e line 1, near "$_ for "
    Execution of -e aborted due to compilation errors.
    
  3. or download this
    next if $. == 1;
    
  4. or download this
    #!/usr/bin/env perl -l
    
    ...
        open my $out_fh, '>', $output_file;
        print $out_fh $_, join ' ', @{ $reformat{$_} } for keys %reformat;
    }
    
  5. or download this
    $ cat pm_1168253_reformat_input_INPUT.txt
    ACCOUNT,DATE,NOTE
    ...
    H654321,20151209,ACCT INTO THE
    H654321,20151209,TOP LINE OF THE ACCT
    H432165,20151209,SINGLE LINE FOR THIS ONE
    
  6. or download this
    $ cat pm_1168253_reformat_input_OUTPUT.txt
    cat: pm_1168253_reformat_input_OUTPUT.txt: No such file or directory
    ...
    H432165,20151209,SINGLE LINE FOR THIS ONE
    H123456,20151209,THIS IS A TEST TO COMBINE ALL MY MATCHING LINES INTO 
    +THE FIRST LINE THAT MATCHES.
    H654321,20151209,MATCH LINES FOR THIS ACCT INTO THE TOP LINE OF THE AC
    +CT