well design, program and test a web interface it is not simple as you said: more, if i understand it correctly, if you want the webserver on Linux and retrieve folders statistics from a win2k12 remote server..
If, by other hand, the webserver is on the windows machine itself, this can be easier.
First install StrawberryPerl on the machine. Now you can use cpan client to install modules as in linux, because strawberry perl comes with a running compiler and many other goodies.
Then you need to learn how to serve html pages: there are many different possibilities and among them Apache for windows. Apache has it's learning curve but is affordable.
Then you have to write your web application: there are a zillion of possibilities of doing this using Perl: you can search and install (via cpan client) Dancer2 as easy way to start with. Another learning curve.
If security is not an issue (well it is always an issue, but let's say you are in a protected env with strong firewall rules etc..) and you need some quick and dirty solution you can resolve with 2 lines of Perl (using UnxUtils to have du usable and Plack via cpan to have plackup at your disposal):
# spaces added for readability # use a perl oneliner to have a minimal output redirected to an index. +html file # it print the folder name, the output of du -csh and mtime a nd ctime + from perl's stat builtin, finally a horizontal rule tag perl -lE "print $_.' '.`du -csh $_`,join' ',map{scalar localtime($_)}( +stat ($_))[9..10].'<hr>' for @ARGV" c:\scripts\chart c:\SCRIPTS\csidl > index.html # use plackup to start a webserver listening on port 5000 plackup -p 5000 -MPlack::App::Directory -e "Plack::App::Directory->new +({root => q{.}})->to_app" # point your browser at the index start http://localhost:5000/index.html # enjoy the result! c:\scripts\chart 35K c:\scripts\chart 35K total Thu Apr 19 14:06 +:24 2012 Tue Apr 10 17:31:54 2012 ---------------------------------------------------------------------- +--------------------------------- c:\SCRIPTS\csidl 16K c:\SCRIPTS\csidl 16K total Thu Apr 19 14:06 +:24 2012 Tue Apr 10 17:31:55 2012 ---------------------------------------------------------------------- +---------------------------------
L*
In reply to Re: Working with folders in Perl and HTML
by Discipulus
in thread Working with folders in Perl and HTML
by LinuxNoob
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |