Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Perl losing, unfairly

by hv (Parson)
on Jun 15, 2004 at 11:19 UTC ( #366835=note: print w/ replies, xml ) Need Help??


in reply to Perl losing, unfairly

Your example replacements are insufficient, because in those cases the string must be printed with a newline.

For 'print first arg', for example, it should be:

print shift, "\n" (or maybe: print "$ARGV[0]\n" )
giving a length of 17 (or maybe 18), exactly the same as (or maybe more than) the score attributed. In the context of a larger program neither '-l' nor 'shift' would likely be reasonable, so you could say the writer has been generous to perl here.

Hugo


Comment on Re: Perl losing, unfairly
Download Code
Re^2: Perl losing, unfairly
by BUU (Prior) on Jun 15, 2004 at 11:25 UTC
    print shift,$/;

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (9)
As of 2015-05-23 00:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    In my home, the TV remote control is ...









    Results (465 votes), past polls