Re: Untitled

By Mungo Curlew, 11 Years ago, written in Perl, viewed 1'004 times. This paste is a reply to Untitled by Soft Bison
URL http://pb.stoleyour.com/view/f36d7597 Embed
Download Paste or View RawExpand paste to full width of browser
  1. my $in_prefix  = "K";
  2. my $out_prefix = "K";
  3.  
  4. if ( $in_traffic > 1024 ) {
  5.         $in_traffic = sprintf( "%.2f", $in_traffic / 1024 );
  6.         $in_prefix = "M";
  7. }
  8. if ( $out_traffic > 1024 ) {
  9.         $out_traffic = sprintf( "%.2f", $out_traffic / 1024 );
  10.         $out_prefix = "M";
  11. }
  12. if ( $in_traffic > 1024 * 1024 ) {
  13.         $in_traffic = sprintf( "%.2f", $in_traffic / 1024 * 1024 );
  14.         $in_prefix = "G";
  15. }
  16. if ( $out_traffic > 1024 * 1024 ) {
  17.         $out_traffic = sprintf( "%.2f",$out_traffic / 1024 * 1024 );
  18.         $out_prefix = "G";
  19. }

Replies to Re: Untitled rss

Title Name When
Re: Re: Untitled Paltry Gorilla 11 Years ago.

Reply to "Re: Untitled"

Here you can reply to the paste above