Tags » Perl

Oracle's OCI accepts 'ampersand' as legal indicators for bind variable placeholders - undocumented?

I came across a piece of Perl DBI code recently. It surprised me that it actually worked.

$dbh->{TraceLevel} = '5|DBD|SQL';

my $sql =<<'EOS';
select :v1, :v2
from dual
where &v2 = 2

my $sth = $dbh->prepare($sql);

$sth->bind_param(':v1', 10);
$sth->bind_param(':v2', 2);


my $rows = $sth->fetchall_arrayref();
print Dumper($rows);

… 298 more words

how to access the single element to compare them for equality in 2-D array

print “@$first\n”;
if (@$first eq @$element)

here, $first and $element are one-dimensional array in a two-dimensional array. So @$first is the 12th item in the one-dimensional array which reference is $first. 7 more words


How to print any row of 2D array


Here, @big1 is an 2D array so $first is just a reference as $big1[0].
Therefore, just dereference it.


Seminar, Fri, 8/29



  1. RecountĀ an aha moment you’ve had as a student of writing. Try to describe not only what you learned but the experience of learning it.
  2. 206 more words

Try rakudobrew and play with concurrency

rakudobrew is similar to perlbrew, but it’s for Rakudo (a.k.a., Perl 6), the Perl-inspired language that we’ve all come to have a love/hate relationship with. 37 more words


Functions of esProc/R/Python/Perl in Structured Data Process by Comparison :Chapter 20. Comparing Sorting Performance

For each script, use built-in library function to sort data, and develop a bubble sort algorithm. Then their performances are presented by comparison.


Perl… 293 more words