[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [FWP] Puzzle - Temp file creation



On 12 Jul 99, at 23:58, Adam Sampson wrote:

>  ... Second, since when has "aaaa"++ been "aaab"?
> 
> 	azz@cartman$ perl
> 	$a = "aaaa"; print $a; print $a++;
> 	aaaaaaaa

Hmm... and on my system I get:

[bernie@mercury script]$ perl -e '$a = "aaaa"; $a++ ; print $a, "\n"'
aaab

> Also, it won't do the right thing if it fails, since it'll end up at
> the next statement after the } whatever it does.

Well, assuming for the moment that the loop was fixed so that the 
autoincrement worked properly [something like '$ext='aaaa', and then 
use $target = "$TMPDIR/quickblast${$}$ext"; in the loop', then it 
isn't clear *WHEN* it will fail, of course.  After 26^4 iterations 
[which is about half-a-million, which will take a fair time in 
itself], you'd be at 'zzzz', and  

[bernie@mercury script]$ perl -e '$a = "zzzz"; $a++ ; print $a, "\n" '
aaaaa

and so it isn't clear it *can* fail... it might loop forever...

  /Bernie\
-- 
Bernie Cosell                   Roanoke Electronic Village
mailto:bernie@rev.net           Roanoke, VA

==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe