Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re: TMTOWTDI Puzzle: Generating a range of numbers

by runrig (Abbot)
on Dec 19, 2001 at 05:28 UTC ( #132993=note: print w/replies, xml ) Need Help??

in reply to TMTOWTDI Puzzle: Generating a range of numbers

In a roundabout way...:
use strict; use warnings; open(FH, ">tmp.txt") or die "OH NOOO!: $!"; print FH "x"; close FH; my (@done, @array) = qw(Why the heck am I even writing this stupid program?); { open(FH, ">>tmp.txt") or die "OH NOOO!: $!"; push @array, -s FH; print FH "x"; close FH; last if @array eq @done; redo; } print "@array\n";
Changed '==' to 'eq' since '==' might be considered a mathmatical operator :-)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://132993]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (10)
As of 2017-01-17 11:14 GMT
Find Nodes?
    Voting Booth?
    Do you watch meteor showers?

    Results (154 votes). Check out past polls.