Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

GotToBTru's scratchpad

by GotToBTru (Curate)
on Jun 15, 2010 at 13:25 UTC ( #844863=scratchpad: print w/ replies, xml ) Need Help??

For Lady Aleena:

for my $part (qw(eye ear lip teeth arm leg)) { my $parts = $part !~ /teeth/ ? $part.'s' : $part; push @{$body_specifics{$parts}}, $parts; push @{$body_specifics{$parts}}, map ("$_ $part",qw(left right)) if +$part !~ /(?:lip|teeth)/; push @{$body_specifics{$parts}}, map { my $p = $part =~ /(?:arm|leg) +/ ? $parts : $part; "$_ $p" } qw(upper lower) if $part !~ /(?:eye|ear +)/; push @{$body_specifics{$parts}}, map( "$_ $part", ('upper left','upp +er right','lower left','lower right') ) if $part =~ /(?:arm|leg)/; } push @{$body_specifics{'teeth'}}, map( "$_ teeth", qw(front canine bic +uspid molar wisdom) );

For craigt:

use strict; use warnings; `touch test1.file`; sleep 10; `touch test2.file`; my $s1 = (stat 'test1.file')[9]; my $s2 = (stat 'test2.file')[9]; printf "Difference between mod times: %d\n",$s2 - $s1;

Results:

test$: perl teststat.pl Difference between mod times: 10 test$:
use strict; use warnings; my $plaintext = 'We are discovered. Flee at once!'; my $key = 'CorrectBatteryHorseStaple'; print "Original message: $plaintext\n"; my $ciphertext = cypher($plaintext,$key); my $represent = $ciphertext; $represent =~ tr/[A-Za-z0-9] /*/c; print " Encoded message: $represent (* indicates non-alphabet characte +r)\n "; my $decoded = cypher($ciphertext,$key); print " Decoded message: $decoded\n"; sub cypher { my $plain = shift; my $key = shift; my $i=0; $key x= ( 1 + length($plain)/length($key) ); return join '', map {$_ ^ substr($key,$i++,1)} (split '',$plain); }
DatePointsPostsRankETA Next RankNext Rank
2010061500InitiateN/AN/A
201407211794154HermitN/AChaplain (1800)
201407231806154Chaplain20141030Deacon(2400)
201410042400203Deacon20141210Curate(3000)
201412103023266Curate20150130Priest(4000)
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 exploiting the Monastery: (6)
As of 2014-12-18 03:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (41 votes), past polls