The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.
#!/perl

use 5.010;
use strict;
use warnings;
use Test::Data::Unixish;
use Test::More 0.96;

test_dux_func(
    func => 'ltrim',
    tests => [
        {in =>["x ", "\na ", "  b\n c\n", [" d"]],
         args=>{},
         out=>["x ", "\na ", "b\nc\n", [" d"]]},
        {in =>["x ", "\na ", "  b\n c\n", [" d"]],
         args=>{strip_newline=>1},
         out=>["x ", "a ", "b\nc\n", [" d"]]},
    ],
);

done_testing;