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);
}
| [reply] [d/l] |
|
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 :-))
| [reply] [d/l] [select] |
|
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?
| [reply] [d/l] |
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
| [reply] [d/l] |
|
eval{die};return
| [reply] [d/l] |
|
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
| [reply] |
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
| [reply] [d/l] [select] |
|
| [reply] |
|
| [reply] |
Re: If the universe was more like Perl, I would...
by jkva (Chaplain) on May 02, 2011 at 06:58 UTC
|
| [reply] |
|
Is PEACE really a bareword? That's so unPerly. :)
| [reply] |
|
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..."
| [reply] |
|
You don't for it to be "just a word" ;-)
| [reply] |
Re: If the universe was more like Perl, I would...
by zentara (Archbishop) on May 01, 2011 at 16:07 UTC
|
| [reply] |
|
| [reply] |
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."
| [reply] [d/l] [select] |
Re: If the universe was more like Perl, I would...
by Anonymous Monk on May 01, 2011 at 09:59 UTC
|
| [reply] |
Re: If the universe was more like Perl, I would...
by FloydATC (Deacon) on May 05, 2011 at 12:44 UTC
|
| [reply] [d/l] |
|
use Ritalin;
--DrWhy
"If God had meant for us to think for ourselves he would have given us brains. Oh, wait..."
| [reply] |
Re: If the universe was more like Perl, I would...
by salva (Canon) on May 02, 2011 at 17:43 UTC
|
| [reply] [d/l] |
|
It would be best if the sub &vacation contained an endless loop and no return;
| [reply] |
|
Sounds like you would enjoy Groundhog day, then. :-)
| [reply] |
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..."
| [reply] [d/l] [select] |
Re: If the universe was more like Perl, I would...
by DrHyde (Prior) on May 06, 2011 at 09:51 UTC
|
study foreach(@everything) | [reply] |
Re: If the universe was more like Perl, I would...
by pingo (Hermit) on May 03, 2011 at 15:47 UTC
|
| [reply] |
|
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..."
| [reply] |
|
| [reply] |
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} | [reply] [d/l] |
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..."
| [reply] |
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; | [reply] [d/l] |
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; | [reply] |
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);
| [reply] |
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)
| [reply] [d/l] |
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();
| [reply] [d/l] |
Re: If the universe was more like Perl, I would...
by ciderpunx (Vicar) on May 05, 2011 at 06:38 UTC
|
eval reverse
qw|Smoke crack pipe|;
| [reply] |
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
| [reply] [d/l] |
Re: If the universe was more like Perl, I would...
by Anonymous Monk on May 18, 2011 at 13:25 UTC
|
| [reply] |
Re: If the universe was more like Perl, I would...
by lancer (Scribe) on May 16, 2011 at 15:31 UTC
|
$my_money = 10000000000000000000000; | [reply] |
Re: If the universe was more like Perl, I would...
by Anonymous Monk on May 18, 2011 at 13:51 UTC
|
| [reply] |