CGI-SHTML
view release on metacpan or search on metacpan
CGI/SHTML.pm view on Meta::CPAN
340341342343344345346347348349350351352353354355356357358359360361362
# Take out the "Content-type:" part, if it's a CGI - note, THIS IS A HACK
if
(
scalar
(
@list
) > 1 &&
$list
[0] =~ /^Content-type: (.*)$/i) {
shift
@list
;
shift
@list
;
}
wantarray
?
@list
:
join
(
"\n"
,
@list
);
}
## _flastmod( FILE )
## _fsize( FILE )
# Last modification and file size of the given FILE, respectively.
sub
_flastmod {
localtime
( (
stat
(
$_
[1]))[9] || 0 ); }
sub
_fsize {
my
$size
= ((
stat
(
$_
[1]))[7]) || 0;
if
(
$size
>= 1048576) {
sprintf
(
"%4.1fMB"
,
$size
/ 1048576);
}
elsif
(
$size
>= 1024) {
sprintf
(
"%4.1fKB"
,
$size
/ 1024);
}
else
{
sprintf
(
"%4d bytes"
,
$size
);
}
}
## _ssieval( HASHREF )
( run in 1.119 second using v1.01-cache-2.11-cpan-49f99fa48dc )