Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    use strict;
    ...
    substr($str,-4,4,'');
    
    print $str;
    
  2. or download this
    #This will also do in case you don't have 4 param substr (i forgot abo
    +ut that)
    
    $str = 'Sat May 5 02:29:11 2001';
    substr($str,0,4) = '';
    substr($str,-4,4) = '';