Friday, April 25, 2008

boring comparison

show complex data structure in perl and ruby

perl
#!/usr/bin/env perl
use warnings;
use Data::Dumper;

$a = ["a", "b", "c", { "key" => "value" } ];
print Dumper $a;


ruby
#!/usr/bin/env ruby
a = ["a", "b", "c", { "key" => "value" } ]
puts a.inspect
 
 

No comments: