# Re: How would this Perl script look in Ruby?

**URL:** <https://www.ruby-forum.com/t/re-how-would-this-perl-script-look-in-ruby/147110>\
**Category:** Ruby\
**Created:** [August 28, 2008, 2:42pm UTC](https://www.ruby-forum.com/t/re-how-would-this-perl-script-look-in-ruby/147110 "2008-08-28T14:42:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![stickstone](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/6f9a4e/32.png) [@stickstone](https://www.ruby-forum.com/u/stickstone)\
**Post date:** [August 28, 2008, 2:42pm UTC](https://www.ruby-forum.com/t/re-how-would-this-perl-script-look-in-ruby/147110/1 "2008-08-28T14:42:42Z")

</div>

> Can somebody please me tell the way to write this script in Ruby?

Certainly.

1. In one window, open a text editor.

2. In another window open your Ruby documentation, for example  
[http://www.ruby-doc.org/](http://www.ruby-doc.org/)  
or buy and open a book such as  
[Pragmatic Bookshelf: By Developers, For Developers](http://www.pragprog.com/titles/ruby/programming-ruby)

3. Type in your Ruby program.

4. Run it.

If you get stuck at point 4 - for example if your program doesn’t work  
in  
the way you expect it - then feel free to come back to this mailing list  
with a specific question. Show the piece of Ruby code which is failing,  
together with the complete error message, and everything you’ve done to  
try  
to work out what is happening. Include information on the version of  
Ruby  
and the platform you’re running under (i.e. operating system version)

For more information on this process, see  
[http://www.catb.org/~esr/faqs/smart-questions.html#intro](http://www.catb.org/~esr/faqs/smart-questions.html#intro)

Anything that looks like (a) a homework assignment, or (b) something  
which  
your employer has asked you to do, but you couldn’t be bothered even to  
attempt yourself, is likely to be ignored.

HTH,

Brian.
