Perl chats on blogs

Tim Chambers timc+perl at divide.net
Mon Mar 17 16:25:20 CST 2003


Found this via blogdex today: http://rc3.org/cgi-bin/less.pl?arg=5040

It's been picked up by 6 blogs as I write this.
http://blogdex.media.mit.edu/track.asp?id=4740439

The Perl line discussed is:
 $depth and $depth += ($datadir =~ tr[/][]) - 1;

The same code in Java would look something like this:
if (depth > 0)
{
  int count = 0;
  for (int i = 0; i < datadir.length(); i++)
  {
     if (datadir.charAt(i) == '/')
     {
       count++;
     }
  }

  count--;

  depth += count;
}

Read the article, then take discussion offline -- discuss at:
http://www.quicktopic.com/20/H/dPR7sdvsWv2nx




More information about the Pikes-peak-pm mailing list