CGI-SHTML

 view release on metacpan or  search on metacpan

CGI/SHTML.pm  view on Meta::CPAN

340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
  # 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 @listshift @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 )