Help for this page

Select Code to Download


  1. or download this
    Input.txt
    2014-04-24 14:22:52|TESTER001||/dev/pts/5|322655663|TYXRRES|0
    2014-04-24 14:22:52|TESTER003||/dev/pts/5|323231258|TRRRDER|0
    2014-04-24 14:22:52|TESTER002||/dev/pts/5|323135368|RCVDDER|0
    
  2. or download this
    Changes.txt
     TESTER001,Frank_Sinatra
     TESTER002,Jhon_Belushi
     TESTER003,Homer_Simson
    
  3. or download this
    Output.txt (desired)
    2014-04-24 14:22:52|Frank_Sinatra||/dev/pts/5|322655663|TYXRRES|0
    2014-04-24 14:22:52|Homer_Simson||/dev/pts/5|323231258|TRRRDER|0
    2014-04-24 14:22:52|Jhon_Belushi||/dev/pts/5|323135368|RCVDDER|0
    
  4. or download this
     real Output.txt
    2014-04-24 14:22:52 Frank_Sinatra  /dev/pts/5 322655663 TYXRRES 0
    2014-04-24 14:22:52 Homer_Simson  /dev/pts/5 323231258 TRRRDER 0
    2014-04-24 14:22:52 Jhon_Belushi  /dev/pts/5 323135368|RCVDDER|0
    
  5. or download this
    #!/usr/bin/perl
    use warnings;
    ...
    
    open( my $file_fh, "<", "Input.txt" ) || die "Can't open the Input.txt
    + file: $!";
    while (<$file_fh>) {
    
  6. or download this
      
     my @line = split( /\|/, $_,);
        for my $char ( @line ) {
    ...
        }
        print $out_fh "\n";
    }