Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    push @{ $hash{$currDir} }, { name => $_, size => ( stat($_) )[7] } for
    + <*>;
    my $j = encode_json \%hash;
    print $j;
    
  2. or download this
    {"/home/user/programming/Perl/tmp":[{"name":"File1.txt","size":63},{"n
    +ame":"File2.txt","size":55},{"name":"temp5.pl","size":196},{"name":"t
    +est.pl","size":197}]}