[28558] in Perl-Users-Digest
Perl-Users Digest, Issue: 9922 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Nov 2 14:05:42 2006
Date: Thu, 2 Nov 2006 11:05:04 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Thu, 2 Nov 2006 Volume: 10 Number: 9922
Today's topics:
Re: "Did not find leading dereferencer" - new findings <benmorrow@tiscali.co.uk>
Re: Abysmal performance of Net::SFTP (and I have GMP & <benmorrow@tiscali.co.uk>
accessing main:: vars in required file <stephen.odonnell@gmail.com>
Re: accessing main:: vars in required file <nobull67@gmail.com>
Re: accessing main:: vars in required file <tzz@lifelogs.com>
Re: accessing main:: vars in required file (reading news)
Re: Encoding problem: Rsquo to a with a hat <afrinspray@gmail.com>
Re: LWP::UserAgent and non-default outgoing IP <benmorrow@tiscali.co.uk>
Re: Mailbox-style directory hashing s1037989@gmail.com
Masking/Hiding a password in Perl Source <nospam@example.com>
Re: Masking/Hiding a password in Perl Source anno4000@radom.zrz.tu-berlin.de
Re: Masking/Hiding a password in Perl Source <nobull67@gmail.com>
Re: Masking/Hiding a password in Perl Source <tzz@lifelogs.com>
PLucene minimum for indexing? <afrinspray@gmail.com>
Re: SQLPlus with Perl <natlee75@yahoo.com>
Re: SQLPlus with Perl <glex_no-spam@qwest-spam-no.invalid>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 2 Nov 2006 17:10:32 +0000
From: Ben Morrow <benmorrow@tiscali.co.uk>
Subject: Re: "Did not find leading dereferencer" - new findings to an old puzzle
Message-Id: <8dlp14-5jh.ln1@osiris.mauzo.dyndns.org>
Quoth "Ronny" <ro.naldfi.scher@gmail.com>:
> Ferry Bolhar schrieb:
> > > In this case, it is imported from an other module, but this has nothing
> > > to do with the "Dereferencer" error, because on the first example I
> > > mentioned, I got that error message in the context of Perl standard
> >
> > This error is reported by the "Text::Balancer" module, it doesn't
> > come from the Perl core:
> >
> > "Did not find leading dereferencer":
> > "extract_variable" was expecting one of '$', '@', or '%' at the
> > start of a variable, but didn't find any of them.
> >
> > Maybe this will help you?
>
> This doesn't make any sense. First, I don't include in my programs any
> Text:: stuff. Second, this would not explain why the error message
> changes to the real one, if, say, I remove one comment line from the
> source code.
Are you by any chance using any modules that set up source filters?
Switch.pm, perhaps? These often use Text::Balanced to do their work, and
it isn't quite as good at parsing Perl as it might be.
As usual, if you reduce your script to the *minimal* example which
reproduces the problem (yes, in this case this might be a lot of work),
and post it here, I'm sure someone can tell you what's going on.
Ben
--
It will be seen that the Erwhonians are a meek and long-suffering people,
easily led by the nose, and quick to offer up common sense at the shrine of
logic, when a philosopher convinces them that their institutions are not based
on the strictest morality. [Samuel Butler, paraphrased] benmorrow@tiscali.co.uk
------------------------------
Date: Thu, 2 Nov 2006 17:01:23 +0000
From: Ben Morrow <benmorrow@tiscali.co.uk>
Subject: Re: Abysmal performance of Net::SFTP (and I have GMP & Pari)
Message-Id: <3skp14-5jh.ln1@osiris.mauzo.dyndns.org>
Quoth "Sisyphus" <sisyphus1@nomail.afraid.org>:
>
> <usenet@DavidFilmer.com> wrote in message
> news:1162432420.105832.200020@m7g2000cwm.googlegroups.com...
> .
> .
> >> To check that's *not* the case I would rename Math/BigInt.pm to
> > > (eg) Math/BigInt_hide.pm, re-run the script and see if performance
> improves.
>
> > I tried your suggestion and the test program blew up with:
> >
> > Can't locate Math/BigInt.pm in @INC ... Crypt/DH.pm line 6
> >
>
> Same culprit as last time.
This I would not expect to work, as Math::BigInt loads the various
libraries for you. You could try moving Math::BigInt::Calc out of the
way, though.
The next version of Math::BigInt is supposed to let you insist on
loading a specific library (see
http://groups.google.co.uk/group/perl.perl5.porters/browse_frm/
thread/7eda1c02e4a92be/ee2a9bbb4e5a160d
(URL broken)).
Ben
--
If you put all the prophets, | You'd have so much more reason
Mystics and saints | Than ever was born
In one room together, | Out of all of the conflicts of time.
benmorrow@tiscali.co.uk The Levellers, 'Believers'
------------------------------
Date: 2 Nov 2006 08:39:33 -0800
From: "Stephen O'D" <stephen.odonnell@gmail.com>
Subject: accessing main:: vars in required file
Message-Id: <1162485573.686196.223070@m7g2000cwm.googlegroups.com>
Guys,
I am trying to create a program that requires a file, and the required
file needs to be able to see variables from the main program (perl
5.6.1):
eg
my %config;
%config = load_config();
# now I have a bunch of name value pairs
require "myotherfile.inc";
foreach my $step (@steps) {
# do something
}
myotherfile.inc includes something like the following:
@steps = ( "$config{KEY}/some/path/etc");
1;
When I run this %config is always undefined in the required file. I
even attempted putting $config in a package and exporting it, and
accessing it from %package::config but it is still undef.
I am obviously missing something about how this works - can someone
please shed some light on it for me? The steps array always contains
data and is accessible in the main program, but it just cannot see the
config hash I populated before requiring it ...
Thanks,
Stephen.
------------------------------
Date: 2 Nov 2006 09:48:46 -0800
From: "Brian McCauley" <nobull67@gmail.com>
Subject: Re: accessing main:: vars in required file
Message-Id: <1162489726.367969.34410@i42g2000cwa.googlegroups.com>
On Nov 2, 4:39 pm, "Stephen O'D" <stephen.odonn...@gmail.com> wrote:
> Guys,
>
> I am trying to create a program that requires a file, and the required
> file needs to be able to see variables from the main program (perl
> 5.6.1):
>
> my %config;
my() declares a variable as _lexically_ scoped. That means it's only
visible in code that is _lexically_ part of the remainder of enclosing
block, it's not visible to code elsewhere that's called via subroutine
calls or do/require. (A lexical variable _is_ (sometimes) visible to
code that's eval()ed even though you'd think it shouldn't be).
See "coping with scoping" or the FAQ "What's the difference between
dynamic and lexical (static) scoping? Between local() and my()?"
------------------------------
Date: Thu, 02 Nov 2006 18:33:38 +0000
From: Ted Zlatanov <tzz@lifelogs.com>
Subject: Re: accessing main:: vars in required file
Message-Id: <g69wt6d8zr1.fsf@lifelogs.com>
On 2 Nov 2006, stephen.odonnell@gmail.com wrote:
> I am trying to create a program that requires a file, and the required
> file needs to be able to see variables from the main program (perl
> 5.6.1):
>
> eg
>
> my %config;
> %config = load_config();
> # now I have a bunch of name value pairs
>
> require "myotherfile.inc";
>
> foreach my $step (@steps) {
> # do something
> }
>
> myotherfile.inc includes something like the following:
>
> @steps = ( "$config{KEY}/some/path/etc");
>
> 1;
>
> When I run this %config is always undefined in the required file. I
> even attempted putting $config in a package and exporting it, and
> accessing it from %package::config but it is still undef.
>
> I am obviously missing something about how this works - can someone
> please shed some light on it for me? The steps array always contains
> data and is accessible in the main program, but it just cannot see the
> config hash I populated before requiring it ...
As much as I dislike the approach you are taking, you want to simply
say
do "myotherfile.inc";
Please look at AppConfig or similar modules to manage your
configuration properly.
"perldoc -f do" will tell you more about how this works.
Ted
------------------------------
Date: Thu, 02 Nov 2006 19:01:08 GMT
From: "Mumia W. (reading news)" <paduille.4060.mumia.w@earthlink.net>
Subject: Re: accessing main:: vars in required file
Message-Id: <Ufr2h.1044$L6.531@newsread3.news.pas.earthlink.net>
On 11/02/2006 10:39 AM, Stephen O'D wrote:
> Guys,
>
> I am trying to create a program that requires a file, and the required
> file needs to be able to see variables from the main program (perl
> 5.6.1):
>
> eg
>
> my %config;
> %config = load_config();
> # now I have a bunch of name value pairs
>
... which are restricted to the current module. You would have to
declare %config as an "our" variable for it to be visible in other modules.
> require "myotherfile.inc";
>
> foreach my $step (@steps) {
> # do something
> }
>
> myotherfile.inc includes something like the following:
>
> @steps = ( "$config{KEY}/some/path/etc");
>
> 1;
>
> When I run this %config is always undefined in the required file. I
> even attempted putting $config in a package and exporting it, and
> accessing it from %package::config but it is still undef.
>
> I am obviously missing something about how this works - can someone
> please shed some light on it for me? The steps array always contains
> data and is accessible in the main program, but it just cannot see the
> config hash I populated before requiring it ...
>
> Thanks,
>
> Stephen.
>
Read "perldoc -f our"
--
paduille.4060.mumia.w@earthlink.net
------------------------------
Date: 2 Nov 2006 08:58:00 -0800
From: "afrinspray" <afrinspray@gmail.com>
Subject: Re: Encoding problem: Rsquo to a with a hat
Message-Id: <1162486680.279379.282660@h54g2000cwb.googlegroups.com>
Todd W wrote:
> 1: you are not exporting the data from perl as UTF8
> and/or
> 2: your document reader is either not configured to or capable of rendering
> UTF8.
> ...
> binmode STDOUT, ":utf8";
> ...
> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
Thanks so much for your reply! I totally understand what's going on
now. My problem is a combination of both one and two. I was getting
the "Wide character in print" warning as well, so I must not be
exporting to utf-8 correctly. Also, I'm reading the content in both
firefox and ie, so I'll have to add the charset to the meta tag as you
did above.
Thanks again for your help,
Mike
------------------------------
Date: Wed, 1 Nov 2006 20:33:19 +0000
From: Ben Morrow <benmorrow@tiscali.co.uk>
Subject: Re: LWP::UserAgent and non-default outgoing IP
Message-Id: <ftcn14-k7p.ln1@osiris.mauzo.dyndns.org>
Quoth Tomek <balrog2000@o2.pl>:
> Hello!
> My box on which Perl runs has several IPs, let's say that:
>
> 192.168.0.1 is the first IP and the default one,
> 192.168.0.5 is the last IP
>
> How to force LWP::UserAgent to connect to remote hosts from IP 192.168.0.3
> ? I couldn't find it in the manual of LWP :(
>
> Now, it always connects from the first and default IP: 192.168.0.1 :( How
> to bind other outgoing address?
You can set the variable @LWP::Protocol::http::EXTRA_SOCK_OPTS to some
extra options to pass to every socket created for http communication. I
can't see with a quick look how to do the same for https/ftp, but this
may be enough for your problem.
Ben
--
"Awww, I'm going to miss her."
"Don't you hate her?"
"Yes, with a fiery vengeance."
[benmorrow@tiscali.co.uk]
------------------------------
Date: 2 Nov 2006 10:41:23 -0800
From: s1037989@gmail.com
Subject: Re: Mailbox-style directory hashing
Message-Id: <1162492883.863885.176380@b28g2000cwb.googlegroups.com>
Peter, thanks for your thoughtful reply! :) My response below...
Peter J. Holzer wrote:
> On 2006-10-31 23:40, s1037989@gmail.com <s1037989@gmail.com> wrote:
> > I whipped up this quick and ugly script and I wanted to post it for
> > code review and others' benefit.
> >
> > With an array such as:
> > qw(aaaa aaab aaac bbbb bccc bcdd bcee bcff cccc dddd)
> >
> > The program returns:
> > # perl list2fs.pl 2
> > /a/aa/aaa/aaaa/aaaa
> > /a/aa/aaa/aaab/aaab
> > /a/aa/aaa/aaac/aaac
> > /b/bb/bbbb
> > /b/bc/bcc/bccc
> > /b/bc/bcd/bcdd
> > /b/bc/bce/bcee
> > /b/bc/bcf/bcff
> > /c/cccc
> > /d/dddd
> >
> > Now as you can see, what this program does is take a list of filenames
> > and "hashifies" it like mailbox storing allowing no more than 2 (or
> > whatever $ARGV[0] is) filenames to be in a single directory. The
> > point, obviously, is if you have 100000 filenames and ext3 won't store
> > 100000 files in a single directory, you can use this technique to break
> > them down.
>
> Ext3 will happily store 100000 filenames in a directory - it just won't
> be very quick in retrieving them (Even that isn't true for Linux 2.6 any
> more - ext3 directories now use a structure called an "htree" to quickly
> access files in huge directories). But assuming you need to use ext3
> with older kernel versions or other filesystems with linear directories:
Ok, I didn't know that. I thought I had read somewhere that the limit
was 32,000 (and thus the reason for using something like reiserfs), but
that was apparently an ancient article... Oops!
> Are all the filenames guaranteed to be the same length? Otherwise, what
> happens if you have these file names?
No. So otherwise, that's a good question. To be more specific with
the filenames, they are actually URLs.
> aaab aaac aaad aaae aaa
>
> You would need a directory /a/aa/aaa and a file /a/aa/aaa. But you can't
> have both.
Actually, in this case, aaa the file would go in aaa the directory.
>
> Do you have all the filenames in advance or is it possible to create new
> files after the structure has been created? If it is the latter, you
> proabably will need a way to split an existing directory if the number
> of files in it becomes too large - what happens when somebody accesses
> the directory in the middle of the split operation? How do you determine
> when you have to split? Count files time you create a new file?
I have the majority of the filenames in advance, but unfortunately the
list will change. To be more specific about what I'm doing: the URLs
are blacklisted domains to be used with squid. I'm writing my own
redirect program in Perl (because I'm not satisified with squidGuard
and do not know C well enough to modify squidGuard). I have been
pondering the idea of giving each URL it's own filename on the FS (disk
space is not an issue) because that would be -- I think -- far more
efficient to lookup a domain name than to parse a file and/or store the
whole list in memory. It would be as simple as: does this file exist?
Oh, the other reason for using a FS versus a MySQL DB is that I hate to
write Web apps and it would be very simple for someone to just create a
new blacklist using Samba from a Windows box.
So as far as handling a changing list, it could just be done nightly.
Blow away the list, and rebuild.
I know this is not the best approach, but I want to make something
simple for a prototype. I hate to invest too much time into it only to
decide it won't be used.
Lastly, just thinking about the problem got me interested in solving
the problem generically. As such, I wrote the quick script and posted
it for review and perhaps for others' benefit.
> Finally, I assume you used the value of 2 for demonstration purposes
> only: Such a small value is not practical: It makes little sense to
> restrict directory sizes to much less than a disk block. A structure as
> you showed with lots of directories with a single file in it would be
> slower than one which is one level less deep.
Correct, 2 was used merely for demonstration purposes. I intend to set
the number to around 1000. I don't want the directory listing to be
too overwhelming.
> > Now, that said, this is NOT intended for "hashifying" mail storage
> > dirs. It IS intended to "hashify" a HUGE list of filenames.
> > Unfortunately this code is VERY inefficient.
>
> How did you determine that is very inefficient?
By running it... :) It was AWFUL! I ran it against a file containing
nearly 600,000 entries. I never waited long enough for it to finish.
> > So, I post it here so people can see my idea if it helps, and so that
> > people can maybe direct me to an existing CPAN module that would
> > accomplish the same thing?
>
> When I needed to do similar things I used a hash function (e.g. MD5 or
> SHA-1) on the key (the filename in your case) to get nice, uniformly
> distributed constant length filenames and then computed the number of
> levels from the maximum number of files I had to store. With 256 files
> per directory, 2 levels would be enough for 16 million files and 3
> levels would be enough for 4 billion files. I never needed more :-).
This is good information, thanks. I'll consider it's practical
purposes, but would defeat the goal of simple blacklist updates via
Samba. :(
> > Or, perhaps someone likes what I've started and wants to help improve
> > the code?
>
> If you avoid copying around huge lists it might be faster. But I'm not
> sure the code even does what you want - see my questions above.
How could I avoid that?
> hp
>
> --
> _ | Peter J. Holzer | > Wieso sollte man etwas erfinden was nicht
> |_|_) | Sysadmin WSR | > ist?
> | | | hjp@hjp.at | Was sonst w=E4re der Sinn des Erfindens?
> __/ | http://www.hjp.at/ | -- P. Einstein u. V. Gringmuth in desd
------------------------------
Date: Thu, 02 Nov 2006 08:13:23 -0800
From: "Chris G." <nospam@example.com>
Subject: Masking/Hiding a password in Perl Source
Message-Id: <454a1934$0$97251$892e7fe2@authen.yellow.readfreenews.net>
I have written a Perl script that connects to various networking devices
and downloads their configurations to a TFTP server. This is working
great and I want to enhance its security by masking the password
somehow. Currently, I hardcode a variable to the password.
$password = 'mypassword';
In the interest of security, I want to find a way to mask this. I'm not
sure how to go about it though. I don't want to have a plain-text
password on the system anywhere.
Any suggestions?
Thanks,
Chris G.
c-gauthie-A-T-pcc-D-O-T-edu (just remove the - characters and make the
appropriate substitutions to email me.
------------------------------
Date: 2 Nov 2006 17:19:02 GMT
From: anno4000@radom.zrz.tu-berlin.de
Subject: Re: Masking/Hiding a password in Perl Source
Message-Id: <4qunk6FotricU1@news.dfncis.de>
Chris G. <nospam@example.com> wrote in comp.lang.perl.misc:
> I have written a Perl script that connects to various networking devices
> and downloads their configurations to a TFTP server. This is working
> great and I want to enhance its security by masking the password
> somehow. Currently, I hardcode a variable to the password.
>
> $password = 'mypassword';
>
> In the interest of security, I want to find a way to mask this. I'm not
> sure how to go about it though. I don't want to have a plain-text
> password on the system anywhere.
That is a laudable intention, but it will require human interaction.
If a program can decrypt a password without outside help, so can
someone who can read the program. Program-internal encryption may
make it harder, but not impossible. So you will at least have to
manually supply a master key that allows the program to access the
passwords it needs. Making the program a long-running server can
reduce the inconvenience, but once at startup human intervention is
needed.
Non of this is specific to Perl.
Anno
------------------------------
Date: 2 Nov 2006 09:53:54 -0800
From: "Brian McCauley" <nobull67@gmail.com>
Subject: Re: Masking/Hiding a password in Perl Source
Message-Id: <1162490034.045424.313400@e3g2000cwe.googlegroups.com>
On Nov 2, 5:19 pm, anno4...@radom.zrz.tu-berlin.de wrote:
> Chris G. <nos...@example.com> wrote in comp.lang.perl.misc:
> > $password = 'mypassword';
>
> > In the interest of security, I want to find a way to mask this. I'm not
> > sure how to go about it though. I don't want to have a plain-text
> > password on the system anywhere.
> If a program can decrypt a password without outside help, so can
> someone who can read the program. Program-internal encryption may
> make it harder, but not impossible.
Just to expand on that... the use of "Program-internal encryption"
should be limited to addressing:
1) The posibility that someone happens to look over your shoulder while
you've got the script on the screen.
2) The possibility that someone who is trying not to learn the password
might accidently assimilate it subliminially.
Of course simply choosing a password that reads like line-noise can do
that almost as well!
------------------------------
Date: Thu, 02 Nov 2006 18:44:14 +0000
From: Ted Zlatanov <tzz@lifelogs.com>
Subject: Re: Masking/Hiding a password in Perl Source
Message-Id: <g69slh18z9d.fsf@lifelogs.com>
On 2 Nov 2006, nospam@example.com wrote:
> I have written a Perl script that connects to various networking devices
> and downloads their configurations to a TFTP server. This is working
> great and I want to enhance its security by masking the password
> somehow. Currently, I hardcode a variable to the password.
>
> $password = 'mypassword';
>
> In the interest of security, I want to find a way to mask this. I'm not
> sure how to go about it though. I don't want to have a plain-text
> password on the system anywhere.
This is actually a hard problem to solve in the general sense. It's
not really a Perl problem either, usually the OS has to manage
permissions.
The plain-text password will be in memory eventually (when you want to
use it), so this will simply delay but not impede the attacker who has
obtained root access.
If the attacker will not have root access, put the password file in a
file that only root can read, and then you can allow access to it
appropriately.
You may want to look into public/private keys as well. It depends on
your existing security infrastructure what you want to do.
Finally, you could make those devices provide their configurations
with a less privileged (non-admin) account, so you don't have the
admin password out there.
Ted
------------------------------
Date: 2 Nov 2006 08:41:54 -0800
From: "afrinspray" <afrinspray@gmail.com>
Subject: PLucene minimum for indexing?
Message-Id: <1162485713.324851.219200@h54g2000cwb.googlegroups.com>
I'm indexing message board postings with Plucene, but I'm having
trouble indexing rows that are small. In my system, each message has a
user id associated with it, but searching with a query like
"intUserID:'132'" never works. I can however search both the subject
and the body. Is the ID too small to be indexed?
Here's an abbreviate example of my indexing code:
$objIndex = Plucene::Index::Writer->new(
$strIndexFilename,
Plucene::Plugin::Analyzer::PorterAnalyzer->new(),
$intNewIndex
);
my $objDoc = Plucene::Document->new();
$objDoc->add(Plucene::Document::Field->Keyword("pkPostID" =>
$pkPostID)); # Never searched.
$objDoc->add(Plucene::Document::Field->Text("intFromID" =>
$intFromID)); # Not searchable?!
$objDoc->add(Plucene::Document::Field->Text("strPostSubject" =>
$strPostSubject)); # Searchable and returned on match
$objDoc->add(Plucene::Document::Field->UnStored("strPostContents" =>
$strPostContents)); # Searchable but never returned (can be large)
$objIndex->add_document($objDoc);
Thanks in advance,
Mike
------------------------------
Date: 2 Nov 2006 08:06:14 -0800
From: "The alMIGHTY N" <natlee75@yahoo.com>
Subject: Re: SQLPlus with Perl
Message-Id: <1162483573.977998.78190@m7g2000cwm.googlegroups.com>
xhoster@gmail.com wrote:
> "The alMIGHTY N" <natlee75@yahoo.com> wrote:
> > Hi all,
> >
> > I've been assigned a project involving SQLplus calls to an Oracle
> > database within Perl code. I have examples of how to perform insert and
> > update statements that don't return anything back to the code, but I
> > now need to perform a select statement to check values in the database.
> >
> > How would I go about executing SQLplus calls and assigning the results
> > to a Perl string or array?
>
> SQL*Plus is Oracle's command line user interface for a *human* to connect
> to and use an Oracle database. Perl is not a human. 99+% of the time,
> you should use DBI and DBD::Oracle, not SQL*Plus, to connect Perl to an
> Oracle database server. It might take a little more work to get
> DBD::Oracle installed and set up, but from then on it will be much better
> than hacking things together with SQL*Plus.
>
> That said, you could run sqlplus in backticks and parse the returned
> value.
>
> Xho
>
> --
> -------------------- http://NewsReader.Com/ --------------------
> Usenet Newsgroup Service $9.95/Month 30GB
Hi, thanks for the reply! After all the searching I've done these past
couple of days, I came to the same conclusion. I'm putting together a
quick script that uses DBI to do everything, but I'm still holding out
hope that there's some solution to this (the senior developers are not
keen on adding a new module to the system especially since this is such
a small part of the applicatiion).
How would one go about running sqlplus "in backticks"?
Thanks,
NL
------------------------------
Date: Thu, 02 Nov 2006 11:10:35 -0600
From: "J. Gleixner" <glex_no-spam@qwest-spam-no.invalid>
Subject: Re: SQLPlus with Perl
Message-Id: <454a2677$0$503$815e3792@news.qwest.net>
The alMIGHTY N wrote:
> xhoster@gmail.com wrote:
>> That said, you could run sqlplus in backticks and parse the returned
>> value.
> Hi, thanks for the reply! After all the searching I've done these past
> couple of days, I came to the same conclusion. I'm putting together a
> quick script that uses DBI to do everything, but I'm still holding out
> hope that there's some solution to this (the senior developers are not
> keen on adding a new module to the system especially since this is such
> a small part of the applicatiion).
If they are "Senior Developers" and they use perl to access
the database, then DBI would already be installed. Also, why
not go to them for help? It's likely you'd already have finished
this project and done it in a way that's supported at your
company.
> How would one go about running sqlplus "in backticks"?
One would first look through the documentation for 'backticks' so
one would learn what it means and one would probably find the
answer on one's own.
The answer would be, "The same as you would run any other command 'in
backticks'."
Look for "qx" in perldoc perlop.
and
perldoc -q "Why can't I get the output of a command with system()"
and
perldoc -q "How can I capture STDERR from an external command"
If you have shell scripts already set-up and, for some reason, you
want to execute those scripts and get the output into a variable in a
perl script, then you could call the shell script, in backticks.
my $script_output = `/some/path/to/script`;
SQLPlus can offer some nice formatting options so depending on your need
using DBI or calling a shell script would be possible solutions.
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc. For subscription or unsubscription requests, send
#the single line:
#
# subscribe perl-users
#or:
# unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.
NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.
#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V10 Issue 9922
***************************************