Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: A Perl aptitude test

by jonadab (Parson)
on May 05, 2003 at 02:04 UTC ( #255553=note: print w/ replies, xml ) Need Help??


in reply to Re: Re: A Perl aptitude test
in thread A Perl aptitude test

considering how many Perl scripts that are out in the wild that use neither 'strict' nor 'warnings,' I think this is a fair question.

Oh, it's fair, I just question whether you're going to get honest answers.

It's also tricky b/c coming first one psychologically expects it to be the easiest question.

Hmmm... then maybe what it's testing is test-taking skills. (Mine are pretty good, but that's not what you probably want to test in most cases.) Would it be less "tricky" if it were pushed back to question 3 or 4? I still think it's an easy question. All you have to know is that "If it looks like a function call, Perl treats it like a function call" (i.e., when you call a function, parentheses after the name of the function define the extent of the arglist). That's pretty fundamental. I'd think you'd have a fairly hard time trying to actually program in Perl without understanding that. All sorts of things would get messed up if you thought foo(blah)+6 would pass (blah)+6 as an argument to foo. Ack. The confusion that would result from such a misunderstanding could be profound.


{my$c;$ x=sub{++$c}}map{$ \.=$_->()}map{my$a=$_->[1]; sub{$a++ }}sort{_($a->[0 ])<=>_( $b->[0])}map{my@x=(& $x( ),$ _) ;\ @x} split //, "rPcr t lhuJnhea eretk.as o";print;sub _{ord(shift)*($=-++$^H)%(42-ord("\r"))};


Comment on Re: A Perl aptitude test
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2014-11-25 02:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (148 votes), past polls