Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

The Grand Cat Dilation Equation

by perlaintdead (Scribe)
on Jan 11, 2014 at 15:34 UTC ( #1070270=CUFP: print w/replies, xml ) Need Help??

The basic theory behind this is the more you age the more cats you acquire. I'm asserting that you don't get your first cat until you are at least 19.

print "age: "; my $age = <STDIN>; chomp $age; print int(( ($age - 12) / 10 ) / 0.618), " cats";

Replies are listed 'Best First'.
Re: The Grand Cat Dilation Equation
by AnomalousMonk (Canon) on Jan 11, 2014 at 15:40 UTC

    You don't acquire cats. Cats acquire you.

Re: The Grand Cat Dilation Equation
by hdb (Prior) on Jan 11, 2014 at 17:55 UTC
Re: The Grand Cat Dilation Equation
by perlaintdead (Scribe) on Jan 11, 2014 at 17:54 UTC
    Larry Wall: 7 cats
    Perl: 2 cats
    C: 5 cats
    Java: 0 cats
    Assembly: 8 cats

      Perl has at least seven eight cats without leaving the core or shelling out. And I'm sure I'm missing more than I identified.

      $new = $string_a . $string_b; # 1 cat. $new = join '', $string_a, $string_b; # 2 cats. $new = "$string_a$string_b"; # 3 cats. $new = pack '(A*)*', $string_a, $string_b; # 4 cats. $new .= $_ for $string_a, $string_b; # 5 cats. $new = do { open my $fh, '>', \my $var; print {$fh} $string_a, $string_b; close $fh; $var; }; # 6 cats. $new = List::Util::reduce { $a .= $b } $string_a, $string_b; # 7 cats. $new = sprintf '%s%s', $string_a, $string_b; # 8 cats.

      Dave

Re: The Grand Cat Dilation Equation
by Anonymous Monk on Jan 16, 2014 at 19:00 UTC
    Dogs have owners. Cats have staff.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: CUFP [id://1070270]
Approved by Corion
Front-paged by Arunbear
help
Chatterbox?
[Discipulus]: in this ubuntu i'm not able to find resource monitor, graphical mount program.. just office and amazon are exposed!

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2016-12-07 08:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (125 votes). Check out past polls.