Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

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 :-)


Comment on Re: TMTOWTDI Puzzle: Generating a range of numbers
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://132993]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2014-11-22 14:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (123 votes), past polls