develooper Front page | perl.perl5.porters | Postings from January 2012

[PATCH] undef stringification

Thread Next
From:
Salvador Fandino
Date:
January 25, 2012 00:58
Subject:
[PATCH] undef stringification
Message ID:
20120125085851.8531.qmail@lists-nntp.develooper.com
Hi,

The attached patch adds support for a new variable $^U that allows to
customize the value of undef when it is converted into an string:

For instance,

  local $^U = '<undef>';
  print "hello $some_undefined_var";

would print:

  hello <undef>


Cheers,

 - Salva

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About