(noob) cast string to array?


(Thomas Adam) #1

— Koncept user@unknown.invalid wrote:

I just wanted to follow up on some of the responses here:

  1. Suggestion to use gsub over sub. I assume that gsub is global?

Yes. gsub is global.

  1. what is the “!” responsible for doing? (Remember me = n00b )

! will modify the object in-place. i.e.

a = "HELLO"
a.downcase!

will retain a as “hello”

– Thomas Adam

···

=====
“The Linux Weekend Mechanic” – http://linuxgazette.net
"TAG Editor" – http://linuxgazette.net

" We’ll just save up your sins, Thomas, and punish
you for all of them at once when you get better. The
experience will probably kill you. :)"

– Benjamin A. Okopnik (Linux Gazette Technical Editor)


BT Yahoo! Broadband - Free modem offer, sign up online today and save £80 http://btyahoo.yahoo.co.uk