Hacker News new | past | comments | ask | show | jobs | submit login

> "first, I can't use %w! to define an array, and secondly You can't call things like that."

The second part is a pretty fundamental language difference but you can use sigils to handle the first part. E.g., to generate word lists use ~w like so:

     ~w(bob tom harry)
If you don't want to use parens, you could use pointy brackets, braces, pipes or a few other delimiters instead.



thanks for the tip!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: