INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Newbie: Ruby vs. Perl

Newbie: Ruby vs. Perl

(OP)
I am a Perl programmer and new to Ruby.

I believe, in theory, Ruby can do whatever Perl can. But how can I tell what modules are available in Ruby? There are CORE & non-core modules in Perl. Are Ruby modules also categorized as core & non-core modules?

Specifically, what are equivalent Ruby modules for perl LWP.pm, Expect.pm. Is there a official ruby site that is similar to cpan.org?

Thanks.

RE: Newbie: Ruby vs. Perl

Hi

Quote (whn):

But how can I tell what modules are available in Ruby?
By "available" you mean exists somewhere on the internet or installed on your machine ?
In the first case you have to search the web.
In the second case I proceed similarly as when looking for installed Perl modules :

CODE

# search for Perl modules
find $( perl -e 'print join " ",@INC' ) -name \*.pm

# search for Ruby modules
find $( ruby -e 'puts $:.join " "' ) -name \*.rb

Quote (whn):

Are Ruby modules also categorized as core & non-core modules?
As considerable amount of modules are also written by community members, they can also be categorized similarly. The code modules are in Ruby Standard Library.

Quote (whn):

Specifically, what are equivalent Ruby modules for perl LWP.pm, Expect.pm.
For LWP replacement see Net::HTTP, part of the standard library.

Regarding expect, not sure. There is an expect module which defines IO.expect ( also part of standard library ), but no idea if it does the same as the Perl module. On RubyForge there is an rexpect module, but that is quite abandoned.

Quote (whn):

Is there a official ruby site that is similar to cpan.org?
Not sure how much official is CPAN, but I would say RubyGems is its equivalent. It has its own package manager too.
 

Feherke.
http://free.rootshell.be/~feherke/

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close