Some Perl code highlighted as ruby

Ruby code posted by X
created at 11 Jun 18:38, updated at 11 Jun 18:45

Edit | Back
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/perl
use strict;
use warnings;

####################################
# some Perl code highlighted as ruby
####################################

use DBI;

my $dbh;

print "Hello World!\n";

my %hash = (
   key => 'value',
);

my $hash_ref = \%hash;

while ( my ($key,$value) = each %hash ) {
    print "$key ---> $value\n";
}

sub X {
   my @X = @_;
   return wantarray ? @X : \@X;
}
420 Bytes in 2 ms with coderay