SlideShare ist ein Scribd-Unternehmen logo
1 von 13
Ruby   For   Perl  Developers
What Is Ruby ? A dynamic, open source programming language with a focus on simplicity and productivity. It has an elegant syntax that is natural to read and easy to write.
Ah, yes, but what is Ruby,  and how it is different then Perl ?
puts 'bla' print “bla”
puts 'bla' 1.class print “bla” $a=1; print ref a;
puts 'bla' 1.class nil.class = NilClass print “bla” $a=1; print ref a; undef=undef
puts 'bla' 1.class nil.class = NilClass (0..999).each do { |i| … } print “bla” $a=1; print ref a; undef=undef for (my $i =0; i<=999; i++) ...
$global = ... local = ... @instance_var = ... @@class_var = ... CONSTANT = ... ; Constant = ... our $global = ... local $local = ; my $local2 = ; - - -
Hash <= v1.8 a = { '22' => 'twenty two' } Hash ... a = { '22' => 'twenty two' }
Hash <= v1.8 a = { '22' => 'twenty two' } Hash >= 1.9 (v2.0 development) a = { '22' : 'twenty two' } Hash ... a = { '22' => 'twenty two' }
a = case b  when /^+$/ : 'digits'   when /^+$/  'letters' when /^[a-f]+$/, /^[A-F]+$/ 'hexa' when '1' : 'one' else  b.class end use Switch; switch ($b) { case /^+$/ { $a = 'digits'; } case /^+$/ { $a = 'letters';} case /^[a-f]+$/ { next; } case /^[A-F]+$/ { $a='hexa';} case ('1') { $a = 'one' } else { $a = ref b; } }
Is that all ? Oh, no,  we didn't even scratch the surface of Ruby.
Questions

Weitere ähnliche Inhalte

Andere mochten auch

Firebird 3 Windows Functions
Firebird 3 Windows  FunctionsFirebird 3 Windows  Functions
Firebird 3 Windows Functions
Mind The Firebird
 
Tips for using Firebird system tables
Tips for using Firebird system tablesTips for using Firebird system tables
Tips for using Firebird system tables
Mind The Firebird
 

Andere mochten auch (6)

Dias De Calmade Henao
Dias De Calmade HenaoDias De Calmade Henao
Dias De Calmade Henao
 
Firebird 3 Windows Functions
Firebird 3 Windows  FunctionsFirebird 3 Windows  Functions
Firebird 3 Windows Functions
 
Life with big Firebird databases
Life with big Firebird databasesLife with big Firebird databases
Life with big Firebird databases
 
How Firebird transactions work
How Firebird transactions workHow Firebird transactions work
How Firebird transactions work
 
Pandora FMS: PostgreSQL Plugin
Pandora FMS: PostgreSQL PluginPandora FMS: PostgreSQL Plugin
Pandora FMS: PostgreSQL Plugin
 
Tips for using Firebird system tables
Tips for using Firebird system tablesTips for using Firebird system tables
Tips for using Firebird system tables
 

Ähnlich wie Ruby for perl developers

Good Evils In Perl
Good Evils In PerlGood Evils In Perl
Good Evils In Perl
Kang-min Liu
 
Introduction to Perl
Introduction to PerlIntroduction to Perl
Introduction to Perl
Sway Wang
 
Perl courseparti
Perl coursepartiPerl courseparti
Perl courseparti
ernlow
 
Introduction to Perl - Day 2
Introduction to Perl - Day 2Introduction to Perl - Day 2
Introduction to Perl - Day 2
Dave Cross
 

Ähnlich wie Ruby for perl developers (20)

Perl Introduction
Perl IntroductionPerl Introduction
Perl Introduction
 
Barcelona.pm Curs1211 sess01
Barcelona.pm Curs1211 sess01Barcelona.pm Curs1211 sess01
Barcelona.pm Curs1211 sess01
 
Beginning Perl
Beginning PerlBeginning Perl
Beginning Perl
 
Dealing with Legacy Perl Code - Peter Scott
Dealing with Legacy Perl Code - Peter ScottDealing with Legacy Perl Code - Peter Scott
Dealing with Legacy Perl Code - Peter Scott
 
Maybe you do not know that ...
Maybe you do not know that ...Maybe you do not know that ...
Maybe you do not know that ...
 
Good Evils In Perl
Good Evils In PerlGood Evils In Perl
Good Evils In Perl
 
Perl Presentation
Perl PresentationPerl Presentation
Perl Presentation
 
Lecture19-20
Lecture19-20Lecture19-20
Lecture19-20
 
Lecture19-20
Lecture19-20Lecture19-20
Lecture19-20
 
Introduction to Perl
Introduction to PerlIntroduction to Perl
Introduction to Perl
 
Modern Perl
Modern PerlModern Perl
Modern Perl
 
Simple perl scripts
Simple perl scriptsSimple perl scripts
Simple perl scripts
 
Regexp secrets
Regexp secretsRegexp secrets
Regexp secrets
 
Introduction to Perl
Introduction to PerlIntroduction to Perl
Introduction to Perl
 
[Erlang LT] Regexp Perl And Port
[Erlang LT] Regexp Perl And Port[Erlang LT] Regexp Perl And Port
[Erlang LT] Regexp Perl And Port
 
Erlang with Regexp Perl And Port
Erlang with Regexp Perl And PortErlang with Regexp Perl And Port
Erlang with Regexp Perl And Port
 
Introduction to Perl
Introduction to PerlIntroduction to Perl
Introduction to Perl
 
Perl courseparti
Perl coursepartiPerl courseparti
Perl courseparti
 
Introduction to Perl - Day 2
Introduction to Perl - Day 2Introduction to Perl - Day 2
Introduction to Perl - Day 2
 
Introduction to Perl - Day 1
Introduction to Perl - Day 1Introduction to Perl - Day 1
Introduction to Perl - Day 1
 

Kürzlich hochgeladen

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Kürzlich hochgeladen (20)

Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 

Ruby for perl developers

  • 1. Ruby For Perl Developers
  • 2. What Is Ruby ? A dynamic, open source programming language with a focus on simplicity and productivity. It has an elegant syntax that is natural to read and easy to write.
  • 3. Ah, yes, but what is Ruby, and how it is different then Perl ?
  • 4. puts 'bla' print “bla”
  • 5. puts 'bla' 1.class print “bla” $a=1; print ref a;
  • 6. puts 'bla' 1.class nil.class = NilClass print “bla” $a=1; print ref a; undef=undef
  • 7. puts 'bla' 1.class nil.class = NilClass (0..999).each do { |i| … } print “bla” $a=1; print ref a; undef=undef for (my $i =0; i<=999; i++) ...
  • 8. $global = ... local = ... @instance_var = ... @@class_var = ... CONSTANT = ... ; Constant = ... our $global = ... local $local = ; my $local2 = ; - - -
  • 9. Hash <= v1.8 a = { '22' => 'twenty two' } Hash ... a = { '22' => 'twenty two' }
  • 10. Hash <= v1.8 a = { '22' => 'twenty two' } Hash >= 1.9 (v2.0 development) a = { '22' : 'twenty two' } Hash ... a = { '22' => 'twenty two' }
  • 11. a = case b when /^+$/ : 'digits' when /^+$/ 'letters' when /^[a-f]+$/, /^[A-F]+$/ 'hexa' when '1' : 'one' else b.class end use Switch; switch ($b) { case /^+$/ { $a = 'digits'; } case /^+$/ { $a = 'letters';} case /^[a-f]+$/ { next; } case /^[A-F]+$/ { $a='hexa';} case ('1') { $a = 'one' } else { $a = ref b; } }
  • 12. Is that all ? Oh, no, we didn't even scratch the surface of Ruby.