Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

If the universe was more like Perl, I would...

by cavac (Parson)
on May 01, 2011 at 09:56 UTC ( [id://902311]=poll: print w/replies, xml ) Need Help??

Vote on this poll

use More::Beer;
[bar] 177/20%
require 'Payment';
[bar] 97/11%
eval($girlfriend_or_boyfriend);
[bar] 58/7%
goto "vacation";
[bar] 148/17%
chop $Someones->Head('Off');
[bar] 41/5%
split(/\ /, "me girlfriend");
[bar] 26/3%
join(' ', 'me', 'party');
[bar] 34/4%
new Car(size=>'big',speed=>'fast');
[bar] 48/6%
bless Flying_Spaghetti_Monster
[bar] 171/20%
other()
[bar] 72/8%
872 total votes
Replies are listed 'Best First'.
Re: If the universe was more like Perl, I would...
by dHarry (Abbot) on May 02, 2011 at 14:14 UTC
    no strict; no warnings; for $banker (@all_bankers) { chop($banker); }
      You sure it shouldn't be ...
      package Banker; no strict; no warnings; use base qw/Greedy SelfAggrandising MorallyBereft/; 1;
      or even ...
      while (my ($banker, $rubbish) = each %bankers) { delete $bankers{$banker}; }
      A user level that continues to overstate my experience :-))
      For clarity, can we rename your variable:

      $banksters
      to distinguish from the folks running our community credit unions and state owned banks which have provided what little institutional push-back to these corporate shenanigans?

Re: If the universe was more like Perl, I would...
by blue_cowdawg (Monsignor) on May 02, 2011 at 15:21 UTC

    Definitely "other" but inspired by use More::Beer (sorta.) This code is actually some psuedo-code written in Perl syntax for the logic flow of how I wanted a brewery controller I was designing to work. (Wanted??? still thinking it through...)

    #!/usr/bin/perl -w #################################################################### use Brewery; use Brewing::Burner; use Water; use Water::Filter; use Time::HiRes qw/ get_timeofday tv_interval /; my $brewery => new Brewery("really.. my normal brewery..."); my $recipe = $brewery-> lookup_recipe("Bosun's Madness Belgian Trippe +l", { size => '10 gallons' } ); my $hot_liquor_tank = $brewery->setup_hot_liquor_tank(); my $mash_tun = $brewery->setup_mash_tun(); my $brewpot = $brewery->setup_brewpot(); my $rims_heater = $brewery->setup_rims_heater(); $hot_liquor_tank -> add_water ( (new Water::Filter(new Water())) -> get_qty($recipe->dough_in_water_qty())); my $hlt_heater = new Brewing::Burner(); $hlt_heater->on(); my $water_temp = $hot_liquor_tank -> get_temp(); while( $water_temp < $recipe->strike_temp() ) { $water_temp = $hot_liquor_tank -> get_temp(); } $hlt_heater->off(); $mash_tun -> add($recipe->grain_bill()); my $mash_temp = $recipe->mash_temp(); my $infusion_time = $recipe->infusion_time(); # as a tv my $t1 = [ gettimeofday() ]; # # mash grain until saccaranification is complete... while ( tv_interval( $t1,$infusion_time) > 0 ) { if ( $rims_heater->status() eq 'OFF' ) { if ( $mash_tun -> get_temp() < $mash_temp ) { $rims_heater->on(); } } else { if ( $mash_tun -> get_temp() >= $mash_temp ) { $rims_heater->off(); } } } $rims_heater->on(); while($mash_tun->get_temp() < $recipe->mashout()){}; $rims_heater->off(); $mash_tun->begin_worlauf(); while( $mash_tun->check_grant()->runnings() ne 'CLEAR' ){ $mash_tun->worlauf()->pump()->recirculate(); } $brewpot->recieve($mash_tun->pump()->wort()); $brewery->boiler_heater->on(); while($brewpot->boiling() ne 'TRUE') { } # Wait until comes to a boil my $start_boil = [ gettimeofday()]; my $currtime=$start_boil; my $stop_boil = $recipe->get_boil_time(); while ( my $time_left=tv_interval($currtime,$stop_boil)){ # Hops are added at 90, 60, 45, 30 and 15 minute to boil # time intervals, typically. (Not all 5 intervals though!) if ( $recipe->hop_time($time_left) ) { $brewpot->add_hops($recipe->scheduled_hops($time_left)); } # # Adjuncts such as candi sugar, irish moss (and other finings) and + # spices get added at certain times of the schedule if ( $recipe->adjunct_time($time_left) ) { $brewpot->add_adjuncts($recipe->scheduled_adjuncts($time_left)); } } $brewery->boiler_heater->off(); $brewery->fermenter->recieve( $brewery->wort_chiller(new Water(),$brewpot->wort_out) ); $brewery->fermenter->add_yeast($recipe->yeast());

    Peter L. Berghold -- Unix Professional
    Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg

      Are you a home brewer or a pro-brewer?

      BTW: I love the code!

        An insanely avid home brewer. I'd love to make it my profession if I had the guts to strike out on my own and open my own brewery. I'd have a blast producing Belgian style ales (think Ommegang) as well as IPAs, Porters and Stouts.


        Peter L. Berghold -- Unix Professional
        Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg
Re: If the universe was more like Perl, I would...
by CountZero (Bishop) on May 02, 2011 at 09:16 UTC
    eval {die;}

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

      lol, I like it!




      I am trying to improve my English skills, if you see a mistake please feel free to reply or /msg me a correction

Re: If the universe was more like Perl, I would...
by jkva (Chaplain) on May 02, 2011 at 06:58 UTC
    seek(PEACE)
      Is PEACE really a bareword? That's so unPerly. :)
        PEACE is a function, not a constant. It requires work to achieve.

        --DrWhy

        "If God had meant for us to think for ourselves he would have given us brains. Oh, wait..."

        You don't for it to be "just a word" ;-)
Re: If the universe was more like Perl, I would...
by zentara (Archbishop) on May 01, 2011 at 16:07 UTC
      Indeed! ;-)
Re: If the universe was more like Perl, I would...
by Utilitarian (Vicar) on May 02, 2011 at 10:39 UTC
    $human->{nature}->{aggression}--; $human->{nature}->{territoriality}--; $human->{nature}->{tolerance}++; $human->{nature}->{reason}++;
    print "Good ",qw(night morning afternoon evening)[(localtime)[2]/6]," fellow monks."
Re: If the universe was more like Perl, I would...
by Anonymous Monk on May 01, 2011 at 09:59 UTC
    die; redo
Re: If the universe was more like Perl, I would...
by FloydATC (Deacon) on May 05, 2011 at 12:44 UTC
    $SIG{INT} = 'IGNORE';

    -- Time flies when you don't know what you're doing
      use Ritalin;

      --DrWhy

      "If God had meant for us to think for ourselves he would have given us brains. Oh, wait..."

Re: If the universe was more like Perl, I would...
by salva (Canon) on May 02, 2011 at 17:43 UTC
    goto &vacation;
      It would be best if the sub &vacation contained an endless loop and no return;
        Sounds like you would enjoy Groundhog day, then. :-)
Re: If the universe was more like Perl, I would...
by pingo (Hermit) on May 03, 2011 at 15:47 UTC
    sin?
      I think that's the answer for the opposite poll: "If perl were more like the universe..."

      --DrWhy

      "If God had meant for us to think for ourselves he would have given us brains. Oh, wait..."

      upvote for honesty.
Re: If the universe was more like Perl, I would...
by cdarke (Prior) on May 04, 2011 at 16:22 UTC
    while(1){chomp;listen;study;fork;sleep}
Re: If the universe was more like Perl, I would...
by DrWhy (Chaplain) on May 05, 2011 at 22:26 UTC
    wife.pl: eval <STDIN>;
    ------
    me.pl: open FSCK, "|perl wife.pl print FSCK "unless(fork) { exec 'baby --sex=any --fingers=10 --toes=10 +' } else { system('make sammich')} "

    --DrWhy

    "If God had meant for us to think for ourselves he would have given us brains. Oh, wait..."

Re: If the universe was more like Perl, I would...
by DrHyde (Prior) on May 06, 2011 at 09:51 UTC
    study foreach(@everything)
Re: If the universe was more like Perl, I would...
by DrWhy (Chaplain) on May 06, 2011 at 15:14 UTC
    sleep 8*3600;

    --DrWhy

    "If God had meant for us to think for ourselves he would have given us brains. Oh, wait..."

Re: If the universe was more like Perl, I would...
by papidave (Pilgrim) on May 10, 2011 at 22:18 UTC
    ($gasoline || $petrol )->price -= 3.00;
Re: If the universe was more like Perl, I would...
by tchrist (Pilgrim) on May 08, 2011 at 23:00 UTC
    print "If the universe was more like Perl, I would...\n" =~ s/\b(??{use utf8;lc uc reverse ſAW})\b/55.46.48.46.48.46.57.94.112.101.114.108/regex;
Re: If the universe was more like Perl, I would...
by Kanishka.black0 (Scribe) on May 09, 2011 at 18:20 UTC

    stop(time);

    rewind(time->before_marriage);
Re: If the universe was more like Perl, I would...
by outkast (Initiate) on May 14, 2011 at 00:28 UTC
    if $me->can(ride) $mount =~ s/wife/ducati/ $me->ride($mount,{chain=>undef,to=>sunset}) else $me->stuck(loc=>rut)
Re: If the universe was more like Perl, I would...
by ciderpunx (Vicar) on May 05, 2011 at 06:38 UTC
Re: If the universe was more like Perl, I would...
by anonymized user 468275 (Curate) on May 16, 2011 at 15:45 UTC
    $girl -> { pretty } and $girl -> { clothing } &&= undef();

    One world, one people

Re: If the universe was more like Perl, I would...
by tangent (Parson) on May 18, 2011 at 16:30 UTC
    use Thoughts2Text my $Parser = Thoughts2Text->new($Larry_et_al) $Parser->print_as_text('/path/to/perl6') ... cd /path/to/perl6 make install run
Re: If the universe was more like Perl, I would...
by Anonymous Monk on May 18, 2011 at 13:25 UTC
    use stricter warnings
Re: If the universe was more like Perl, I would...
by lancer (Scribe) on May 16, 2011 at 15:31 UTC
    $my_money = 10000000000000000000000;
Re: If the universe was more like Perl, I would...
by Anonymous Monk on May 18, 2011 at 13:51 UTC

View List Of Past Polls


Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2024-03-28 11:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found