Help for this page

Select Code to Download


  1. or download this
      a) 's/\s*#.*//'
      b) '$_ = $` if /#/'
      c) '($_) = split/#/'
      d) '$_ = substr($_, 0, $-[0]) if /#/'
      e) 'if ((my $p = index($_, "#")) > -1) { substr($_, $p, -1, "") }'
    
  2. or download this
       a) '{}'
       b) ''
       c) ';'
       d) All of the above
       e) None of the above
    
  3. or download this
       a) '$_ = (split/#/)[0]'
       b) '($_) = split/#/'
       c) Too close to tell
    
  4. or download this
       a) '$i = ""; $i = 1 if ($_ % 2) == 0'
       b) 'if (($_ % 2) == 0) {$i = 1} else {$i = ""}'
       c) Too close to tell
    
  5. or download this
       a) '($str1, $str2) = split/:/ if /:/',
       b) 'if (/:/) {$str1 = $`; $str2 = $\'}',
       c) 'if (/:/) {$str1 = substr($_,0, $-[0]); $str2 = substr($_,$+[0])
    +}'
       d) '($str1,$str2) = m/(\d*):(\d*)/ if /:/'
       e) Too close to call.
    
  6. or download this
       $_ = "123:45678";
       
       foreach (1..2000000) {
          # snippet goes here ;
       }
    
  7. or download this
       a) 'foreach (1..$n){$m = $_}'         
       b) '$m = $_ for (1..$n)'              
       c) 'for ($i=1;$i<$n+1;$i++) {$m = $i}'
       d) Too close to call.
    
  8. or download this
       my ($i, $m);
       my $n = 5000000;
       # snippet goes here