>>>>> "CN" == Chris Nehren <c.nehren/beginn...@shadowcat.co.uk> writes:

  CN> On Wed, Jun 01, 2011 at 12:00:36 -0400 , Uri Guttman wrote:
  >> also the use of // for defined or is relatively recent in perl. be
  >> careful when using it as it may not work in the version you have
  >> installed or in production.

  CN> Relatively recent meaning 3.5 years old, and released in a version of
  CN> perl that has been officially EOLd by the perl5 porters (giving way to
  CN> 5.12 and 5.14). It's only an issue if you're on an old, not-updated
  CN> RedHat, an ancient Debian (old-old stable, maybe older still), or an old
  CN> Solaris. Maybe some other rather older systems.

and i was doing a project this past year (aug 2010 - mar 2011) where i
used // in my code since it was fine on my machine. i had to remove it
since the production server was running 5.8 and the boss wouldn't
upgrade it. not much i could do about that.

// is cool but is a minor improvement you can work around very
easily. and || is usually fine for that if you design your var not to
have 0 or '' for a possible value. so the need for // is minimal but it
is still cool to have.

uri

-- 
Uri Guttman  ------  u...@stemsystems.com  --------  http://www.sysarch.com --
-----  Perl Code Review , Architecture, Development, Training, Support ------
---------  Gourmet Hot Cocoa Mix  ----  http://bestfriendscocoa.com ---------

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to