Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    my $input = '[8/29/2013 7:16:45 AM] User abc def [DEFAULT] [8/29/2013 
    +7:16:45 AM] User xyz abc [DEFAULT]';
    my $output = join '', map { s/\s/\t/g if /\[/; $_ } split /(\[.*?\])/,
    + $input;
    print "$output\n";