Created
February 9, 2019 20:26
-
-
Save leszekdubiel/46aa24388b067bc31c2e758ace6f3f51 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
printf "\tname John\tage 24\t\ncity Kraków\tname Ann\tabout works here\tage 45\n\tspeaks Polish\tname Leszek\t\r\v\b\t\tnote malformed line still works\n" | perl -e 'use utf8; use Modern::Perl qw{2017}; use Data::Dumper; no warnings qw{uninitialized}; while (<STDIN>) { my %h = map { split / /, $_, 2 } grep { / / } split /[^[:print:]]/, $_, -1; 0 && warn Dumper(\%h); print "\t$_ $h{$_}" for @ARGV ? @ARGV : sort keys %h; print "\t\n"; }' name age about |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
O! Thank you... I think I didn't get email that you have commented. I will test that too.
:)