note
cLive ;-)
<CODE>
sub i{$_=<>;chop;if(/^\d{1,4}$/){return sprintf("%04d",$_)}print"!\n";&i}$c=i;$d=i;for($c..$d){$_="bar$_.jpg";print"$_\n"unless(-e)}
</CODE>
<P>Enter first then last in sequence. no check made that second number is larger than first (not in challenge :))
<P>! means re-enter digit
<P>131 chars (includes 'bonus' challenge).
<P>Hmmm, that was fun :)
<P>cLive ;-)
<P><B>Update:</B> if larger strings *are* valid as long as they are numerically correct, the above needs amending to:
<CODE>
sub i{$_=<>;chop;if(/^\d+$/&&$_<10000){return sprintf("%04d",$_)}print"!\n";&i}$c=i;$d=i;for($c..$d){$_="bar$_.jpg";print"$_\n"unless(-e)}
</CODE>
<P>adding another 6 chars...
82434
82434