Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: strawberry on XP

by mwah (Hermit)
on May 22, 2008 at 10:42 UTC ( #687926=note: print w/replies, xml ) Need Help??


in reply to strawberry on XP

Your program:

use strict; use warnings; use Benchmark; my @junk = `cat /etc/motd`; # not available on windows my $count = 10_000; timethese($count, { 'map' => sub { my @a = @junk; map { s/a/b/ } @a; return @a }, 'for' => sub { my @a = @junk; for (@a) { s/a/b/ }; return @a }, } ); # "my $var = defined(<STDIN>)";

wouldn't work because there's no cat and no /etc/motd available on your box (probably)

Other reasons: there were loads of typos (corrected).

Regards

mwa

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://687926]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (3)
As of 2021-04-15 23:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?