#!/usr/bin/env perl # vim: sts=3 ts=3 sw=3 et ai : use strict; use warnings; use Data::Dumper; $Data::Dumper::Indent = 1; use Data::Tubes qw< pipeline >; my $input = <<'END'; Foo Bar :Via Baz, 10:+39 348 1234567, , :foo@example.com: John Doe : :1234 ,456,7890::http://www.example.com END pipeline( 'Source::open_file', 'Reader::by_line', [ 'Parser::by_format' => 'name:address:mobile,fixed,fax:email:website', trim => 1 ], sub { $_[0]{rendered} = Dumper($_[0]{structured}); return $_[0]; }, 'Writer::to_files', {tap => 'sink'}, )->(\$input);