#!/usr/bin/env perl
use strict;
use warnings;
use YAML::XS;

local $/ = undef;

my %param = %{ YAML::XS::Load( <> ) };

for my $path ( @{$param{argv}} )
{
    if( $path =~ /\/$/ )
    {
        next unless chdir $path;
        system 'find . -type f';
    }
    elsif( $path =~ /\*/ )
    {
        map{ print "$_\n"; }grep{ -f $_ }glob $path;
    }
    else
    {
        print "$path\n" if -f $path;
    }
}

exit 0;
