Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Homework question list

by TedPride (Priest)
on May 21, 2005 at 07:26 UTC ( #459204=note: print w/replies, xml ) Need Help??


in reply to Homework question list

Just browse the boards every day and try to solve the more algorithmic-style questions without looking at the code people have posted. Then compare your code to theirs. A week or two of this will give you a fairly good grasp of Perl.

By the way, the simplest way to remove trailing newlines from an array is:

chomp for @arr;
You could also use chop, substr, or s///, but chomp has the best combination of speed and flexibility for this task.

Replies are listed 'Best First'.
Re^2: Homework question list
by Aragorn (Curate) on May 21, 2005 at 17:32 UTC
    Even better would be:
    chomp @arr;
    because when chomp is fed a list, it'll chomp each element.

    Arjen

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://459204]
help
Chatterbox?
[pryrt]: Sorry, my bad: it was't done downloading when I did the sha1sum... now I match your 309ad... value
[stevieb]: I'll see how to get in touch with someone and advise that there's an issue. Thanks for helping me confiirm pryrt!
[pryrt]: 5.14.2.1-32 also mismatches; but 5.24.1.1-64 matches their sha1

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (9)
As of 2017-03-29 21:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (353 votes). Check out past polls.