Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: A Perl aptitude test

by gmpassos (Priest)
on May 02, 2003 at 22:00 UTC ( #255177=note: print w/ replies, xml ) Need Help??


in reply to A Perl aptitude test

Well, the user can test the code before answer it?

The first question is trick. First doesn't make sence write it, since why add 3 to the 1 returned of the print if you aren't catching the print return?

And you should write:

print ((2*3)+3) ; # if you want to print 9 # or... $ret = (print(2*3)) + 3 ;
I think that you can skeep this question, since you are testing a code that doesn't make sence! There's much better things that you can test. Like ask to make a simple OO module, make a tie object, and use DBI.

The other questions are fine.

Graciliano M. P.
"The creativity is the expression of the liberty".


Comment on Re: A Perl aptitude test
Download Code
Replies are listed 'Best First'.
Re^2: A Perl aptitude test
by Aristotle (Chancellor) on May 03, 2003 at 01:16 UTC
    Actually, I quite like Q1 and find it appropriate. I ran across this behaviour multiple times as a beginner and it was not until I had a firmer grasp of the language that I understood exactly where and why I need to disambiguate things. TheDamian has the better suggestion on what to do about that question.

    Makeshifts last the longest.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (12)
As of 2015-07-29 22:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (269 votes), past polls