<?xml version="1.0" encoding="windows-1252"?>
<node id="716396" title="Re^3: Generate the perl sequence 1, 11, 111, ...." created="2008-10-10 05:07:43" updated="2008-10-10 05:07:43">
<type id="11">
note</type>
<author id="634253">
AnomalousMonk</author>
<data>
<field name="doctext">
&lt;blockquote&gt;&lt;i&gt;... is it possible to write a perl subroutine that does the same thing, myPerlSub BLOCK LIST
&lt;/i&gt;&lt;/blockquote&gt;

Absolutely.  See [doc://perlsub] and in particular [doc://perlsub#Prototypes]. 

&lt;c&gt;
&gt;perl -wMstrict -le
"sub mysub (&amp;@) {
     my $coderef = shift;
     map $coderef-&gt;($_), @_;
     }
 my @out = mysub { $_ += 33 } 0 .. 5;
 print qq{@out};
"
33 34 35 36 37 38
&lt;/c&gt;</field>
<field name="root_node">
716367</field>
<field name="parent_node">
716377</field>
</data>
</node>
