On Tue, 28 Sep 2010 12:20:50 -0400 charmie maniar <[email protected]> wrote: > Thanks a lot for your replies. Can someone please explain me what > this line does: > > % my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = > localtime((stat($r->filename))[9]);
Localtime returns an array based on a "seconds since the epoch" timestamp; stat also returns an array, the 10th field of which is the last modification time of a file in such a form. You can find documentation for perl functions at http://perldoc.perl.org/ Presuming $r is an Apache2::RequestRec object (which it almost certainly is, this is available in mason with HTML::Mason::Request->instance), $r->filename is the name of the file requested from the HTTP GET request which initiated the transaction. You can find the documentation for Apache2::RequestRec at CPAN: http://search.cpan.org/~pgollucci/mod_perl-2.0.3/docs/api/Apache2/RequestRec.pod I'd recommend asking general perl questions at a forum such as www.perlmonks.org, where you will get a much more immediate response. -- MK <[email protected]> ------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev _______________________________________________ Mason-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mason-users

