Help for this page

Select Code to Download


  1. or download this
    "AD\thomas"  -> "AD    homas" # tab
    "MAIN\nancy" -> "MAIN         
                     ancy"        # newline
    "nancy"      -> "nancy"       # no domain, no problem
    
  2. or download this
    $domainID =~ (s/(AD|MAIN)\n/n/);   # should not be
    $domainID =~ (s/(AD|MAIN)\r/r/);   # checked 3 times
    $domainID =~ (s/(AD|MAIN)\t/t/);   # before exiting
    
  3. or download this
    our %whitespace = ( "\f" => "f","\n" => "n","\r" => "r","\t" => "t" );
    
    $netid =~ (s/(\s)/$whitespace{$1}/g);
    $netid =~ (s/(AD|MAIN)//);
    
  4. or download this
    "AD\thomas"  -> "thomas"
    "MAIN\floyd" -> "floyd"
    "AD\manny"   -> "manny" # perl escapes normal char, no harm