<?xml version="1.0" encoding="windows-1252"?>
<node id="82461" title="Re: Perl Golf Proposal" created="2001-05-23 02:53:38" updated="2005-07-19 14:08:39">
<type id="11">
note</type>
<author id="43546">
chipmunk</author>
<data>
<field name="doctext">
Keeping in mind that this golf challenge asks for a program rather than a subroutine... :)
&lt;p&gt;
&lt;b&gt;48 characters&lt;/b&gt;:
&lt;code&gt;#!perl
$m=pop;for$"(pop..$m){$_="@ARGV";-e||warn"$_\n"}
&lt;/code&gt;
example usage: &lt;code&gt;perl missing.pl bar .jpg 0000 0050&lt;/code&gt;
&lt;p&gt;
Hurrah for the range operator and magical auto-increment!
&lt;p&gt;
As best I can figure it, the only way to accurately accomplish the bonus (checking for a comparison string that's too big) is to check all the files in the directory.  Otherwise there could be one file in there with a unique part of the right length.</field>
<field name="root_node">
82434</field>
<field name="parent_node">
82434</field>
</data>
</node>
