<?xml version="1.0" encoding="windows-1252"?>
<node id="330838" title="Re: $#=&quot;%c&quot;; possible bug" created="2004-02-21 13:20:06" updated="2005-06-11 07:20:44">
<type id="11">
note</type>
<author id="295576">
ambrus</author>
<data>
<field name="doctext">
&lt;P&gt;After abigail's post, it's clear how $# works. Perl calls the builtin sprintf with a single floating point argument, and the resulting text is
the string representation of the number (if $# is set). You can even decompose a double to two ints by setting $# to "%x/%x".
This explains the strange strange phenomena that setting $# to a stupid value causes.
&lt;P&gt;However, as an interesting consequence you can still segfault perl with some code like
&lt;code&gt;perl -we '$#="%s\n"; print exp 1;'&lt;/code&gt; or &lt;code&gt;perl -we '$#="%n\n"; print exp 1;'&lt;/code&gt;</field>
<field name="root_node">
330691</field>
<field name="parent_node">
330691</field>
</data>
</node>
