Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
This is my first try of Perl poetry type things.
This program proves that Perl is the language of the gods.
Sorry if it offends anyone, it isn't intended to
#!/universe/bin/perl -U # Maintainer : God # Revision history : None, made this while bored # Notes : could be a few bugs # : couldn't get it to work with warnings,strict or taint package Lifeform::Human; use vars qw/@ISA $VERSION/; $VERSION = 0.001; # very, very, very alpha @ISA = qw/Lifeform::base/; sub new { my $class = shift; my $person = $class->SUPER::new(@_); $person->{Location} ||= 'infinity'; unless ($person->{father}) { $person->{bastard} = 1; $person->{fath +er} = new Lifeform::base } unless ($person->{mother}) { $person->{flags} = 0xFFFFFF; $person-> +{mother} = new Lifeform::base } for (0..@{$person->{mother}->{chromosones}) { push @{$person->{chromosones}}, do_foo( $person->{mother}->{chromosones}->{$_}, $person->{father}->{chromosones}->{$_}); } bless($person, $class) if defined($person->{good}); $person->create; return $person; } sub kill { my ($person, $killer) = @_; $person->{dead} = 1; push @{$GROUND}, split(//,$person->{body}); $killer->damn( To => Hell ) if ($killer ne $TIME); } package main; use Universe; use Lifeform::Human; use vars qw/@people/; my $Universe = new Universe; my $Earth = $Universe->create(Type => 'World'); my $adam = new Lifeform::Human(Location => $Earth); my $eve = $adam->clone; $eve->alter('gender','f'); $child = new Human(father => $adam, mother => $eve); @people=($adam,$eve,$child); while ($Universe->exists and $Universe->stable) { push @people, new Human (father => $people[rand(@people)], mother => $people[rand(@people)]); $Earth->destroy(Amount => (@people/(10**20)), Part => 'random'); } undef @people; undef $Earth; undef $Universe; close; die;

In reply to universe.pl by repson

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (2)
As of 2021-05-18 19:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Perl 7 will be out ...





    Results (183 votes). Check out past polls.

    Notices?