Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

jdavidb (1361)

jdavidb
  (email not shown publicly)
http://voiceofjohn.blogspot.com/

J. David Blackstone has a Bachelor of Science in Computer Science and Engineering and nine years of experience at a wireless telecommunications company, where he learned Perl and never looked back. J. David has an advantage in that he works really hard, he has a passion for writing good software, and he knows many of the world's best Perl programmers.

Journal of jdavidb (1361)

Thursday June 05, 2003
01:22 PM

Seen in the wild

[ #12637 ]

I just found the following in someone else's PL/SQL program:

   SELECT p_item_segment1||'.'||p_item_segment3
     INTO lv_item_number
     FROm dual;

First of many, I'm sure. I'll try to remember to report here the first time I do it.

For those of you who may not be fluent in PL/SQL, the above is functionally equivalent to:

lv_item_number := p_item_segment1 || '.' ||
                  p_item_segment3;

A rough Perl translation of the latter would be:

$lv_item_number = join('.',
                       $p_item_segment1,
                       $p_item_segment3);

A rough Perl translation of the former would require loading DBI and sending your two values to the database to be joined in SQL.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.