[32426] in Perl-Users-Digest
Perl-Users Digest, Issue: 3693 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat May 19 21:09:29 2012
Date: Sat, 19 May 2012 18:09:11 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Sat, 19 May 2012 Volume: 11 Number: 3693
Today's topics:
DBD::Oracle build on aix 6.1 ( host is a 64 bit db serv <xtdkmqc@gmail.com>
Re: DBD::Oracle build on aix 6.1 ( host is a 64 bit db <ben@morrow.me.uk>
Re: DBD::Oracle build on aix 6.1 ( host is a 64 bit db xtdkmqc@gmail.com
Re: DBD::Oracle build on aix 6.1 ( host is a 64 bit db <ben@morrow.me.uk>
Re: Encrypted connection <tw+usenet@dionic.net>
Re: Encrypted connection (Jens Thoms Toerring)
Re: First Commercial Perl Program <ronaldljohnson@gmail.com>
Re: Net::SSH::Expect <ben@morrow.me.uk>
Re: Net::SSH::Expect <rodbass63@gmail.com>
Re: Net::SSH::Expect (Tim McDaniel)
Re: Net::SSH::Expect <jimsgibson@gmail.com>
Re: Net::SSH::Expect <ben@morrow.me.uk>
Re: Net::SSH::Expect (Tim McDaniel)
Re: Net::SSH::Expect <ben@morrow.me.uk>
Re: Net::SSH::Expect (Tim McDaniel)
Re: Objective C (OT) <hjp-usenet2@hjp.at>
Re: Objective C (OT) <m@rtij.nl.invlalid>
Re: WWW::Mechanize and 3rd party APIs (Google) (Seymour J.)
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sat, 19 May 2012 13:35:07 -0500
From: Am Nym <xtdkmqc@gmail.com>
Subject: DBD::Oracle build on aix 6.1 ( host is a 64 bit db server )
Message-Id: <wro4nrcc944.fsf@msgid.invalid.invalid>
The 64 bit Oracle server is loaded on this host.
Do I still have to load an Oracle client?
README.clients.txt says:
*** THE PREFERED METHOD IS TO USE Oracle Instant Client ***
So should I install the 'Oracle Instant Client' before attempting
the build of DBD::Oracle?
--
thanks!
------------------------------
Date: Sat, 19 May 2012 20:07:10 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: DBD::Oracle build on aix 6.1 ( host is a 64 bit db server )
Message-Id: <uj7l89-dfo1.ln1@anubis.morrow.me.uk>
Quoth Am Nym <xtdkmqc@gmail.com>:
> The 64 bit Oracle server is loaded on this host.
>
> Do I still have to load an Oracle client?
Is your perl 32bit or 64bit? Is it built with gcc or the system cc?
Which version of Oracle are you using?
The impression I get from README.{clients,aix}.txt is that if your perl
is 64bit, or if you have Oracle 10g (which apparently comes with 32bit
client libraries), you don't need anything else; otherwise, you need to
install Instant Client (and set ORACLE_HOME to point to the Instant
Client installation) to get the 32bit client libraries.
I have no experience with either Oracle or AIX, though, so I could well
be wrong.
Ben
------------------------------
Date: Sat, 19 May 2012 14:57:44 -0700 (PDT)
From: xtdkmqc@gmail.com
Subject: Re: DBD::Oracle build on aix 6.1 ( host is a 64 bit db server )
Message-Id: <e77b09c7-cde3-4685-ad2a-a8dd32f5325e@googlegroups.com>
On Saturday, May 19, 2012 2:07:10 PM UTC-5, Ben Morrow wrote:
> Quoth Am Nym <------@gmail.com>:
> > The 64 bit Oracle server is loaded on this host.
> >=20
> > Do I still have to load an Oracle client?
>=20
> Is your perl 32bit or 64bit?=20
$ perl -V
Summary of my perl5 (revision 5 version 8 subversion 8) configuration:
Platform:
osname=3Daix, osvers=3D5.3.0.0, archname=3Daix-thread-multi
uname=3D'aix akash79 3 5 00011a85d600 '
config_args=3D'-desr -Dinstallprefix=3D/usr/opt/perl5 -Dprefix=3D/usr=
/opt/perl5 -Dcc=3Dxlc_r -Duseshrplib -Dusethreads'
hint=3Drecommended, useposix=3Dtrue, d_sigaction=3Ddefine
usethreads=3Ddefine use5005threads=3Dundef useithreads=3Ddefine usemu=
ltiplicity=3Ddefine
useperlio=3Ddefine d_sfio=3Dundef uselargefiles=3Ddefine usesocks=3Du=
ndef
use64bitint=3Dundef use64bitall=3Dundef uselongdouble=3Dundef
usemymalloc=3Dn, bincompat5005=3Dundef
Compiler:
cc=3D'cc_r', ccflags =3D'-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOUR=
CE -qmaxmem=3D-1 -qnoansialias -DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT -q32=
-D_LARGE_FILES -qlonglong',
optimize=3D'-O',
cppflags=3D'-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=
=3D-1 -qnoansialias -DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT'
ccversion=3D'9.0.0.2', gccversion=3D'', gccosandvers=3D''
intsize=3D4, longsize=3D4, ptrsize=3D4, doublesize=3D8, byteorder=3D4=
321
d_longlong=3Ddefine, longlongsize=3D8, d_longdbl=3Ddefine, longdblsiz=
e=3D8
ivtype=3D'long', ivsize=3D4, nvtype=3D'double', nvsize=3D8, Off_t=3D'=
off_t', lseeksize=3D8
alignbytes=3D8, prototype=3Ddefine
Linker and Libraries:
ld=3D'ld', ldflags =3D' -brtl -bdynamic -b32'
libpth=3D/lib /usr/lib /usr/ccs/lib
libs=3D-lbind -lnsl -lgdbm -ldbm -ldb -ldl -lld -lm -lcrypt -lpthread=
s -lc -lbsd
perllibs=3D-lbind -lnsl -ldl -lld -lm -lcrypt -lpthreads -lc -lbsd
libc=3D, so=3Da, useshrplib=3Dtrue, libperl=3Dlibperl.a
gnulibc_version=3D''
Dynamic Linking:
dlsrc=3Ddl_aix.xs, dlext=3Dso, d_dlsymun=3Dundef, ccdlflags=3D' -bE:=
/usr/opt/perl5/lib/5.8.8/aix-thread-multi/CORE/perl.exp'
cccdlflags=3D' ', lddlflags=3D'-bhalt:4 -bexpall -G -bnoentry -lpthre=
ads -lc'
Characteristics of this binary (from libperl):
Compile-time options: MULTIPLICITY PERL_IMPLICIT_CONTEXT
PERL_MALLOC_WRAP USE_ITHREADS USE_LARGE_FILES
USE_PERLIO USE_REENTRANT_API
Built under aix
Compiled at Jun 2 2009 16:11:40
@INC:
/usr/opt/perl5/lib/5.8.8/aix-thread-multi
/usr/opt/perl5/lib/5.8.8
/usr/opt/perl5/lib/site_perl/5.8.8/aix-thread-multi
/usr/opt/perl5/lib/site_perl/5.8.8
/usr/opt/perl5/lib/site_perl
.
What does the above, imply 32 or 64 bit?
> Is it built with gcc or the system cc?
See above: IBM compiler 'cc_r'.
> Which version of Oracle are you using?
11g
> The impression I get from README.{clients,aix}.txt is that if your perl
> is 64bit, or if you have Oracle 10g (which apparently comes with 32bit
> client libraries), you don't need anything else;=20
Is there a way to check for the client libs?
The build made it to near the end; it failed w/error:
--snip
rm -f blib/arch/auto/DBD/Oracle/Oracle.so
LD_RUN_PATH=3D"/products/app/oracle/product/11.2.0/ee_1/lib:/produc=
ts/app/oracle/product/11.2.0/ee_1/rdbms/lib" ld -bhalt:4 -bexpall -G -bnoe=
ntry -lpthreads -lc Oracle.o dbdimp.o oci8.o /usr/lib/crt0_r.o -o blib/a=
rch/auto/DBD/Oracle/Oracle.so -L/products/app/oracle/product/11.2.0/ee=
_1/lib/ -lclntsh -lld -lm -ldl -lc -lm -lpthreads -lodm -lbsd_r -lld -lperf=
stat -lm -lpthreads
ld: 0711-736 ERROR: Input file /products/app/oracle/product/11.2.0/ee_1/lib=
//libclntsh.so:
XCOFF64 object files are not allowed in 32-bit mode.
make: The error code from the last command is 8.
> otherwise, you need to
> install Instant Client (and set ORACLE_HOME to point to the Instant
> Client installation) to get the 32bit client libraries.
>=20
> I have no experience with either Oracle or AIX, though, so I could well
> be wrong.
--
Thanks much for your help.=20
------------------------------
Date: Sat, 19 May 2012 23:30:03 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: DBD::Oracle build on aix 6.1 ( host is a 64 bit db server )
Message-Id: <bgjl89-o3b.ln1@anubis.morrow.me.uk>
Quoth xtdkmqc@gmail.com:
> On Saturday, May 19, 2012 2:07:10 PM UTC-5, Ben Morrow wrote:
> > Quoth Am Nym <------@gmail.com>:
> > > The 64 bit Oracle server is loaded on this host.
> > >
> > > Do I still have to load an Oracle client?
> >
> > Is your perl 32bit or 64bit?
>
> $ perl -V
> Summary of my perl5 (revision 5 version 8 subversion 8) configuration:
(That's pretty old; both 5.8 and 5.10 are unsupported by the perl
developers at this point. You should seriously consider upgrading.)
<snip>
> cc='cc_r', ccflags ='-D_ALL_SOURCE -D_ANSI_C_SOURCE
That's the system cc.
> intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
> d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8
> ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
intsize=4, ivsize=4 and ptrsize=4, so this is an entirely 32bit perl.
(It's possible, at least on some architectures, to build perl to use
64bit integers even if it's using 32bit pointers.)
> > Which version of Oracle are you using?
>
> 11g
>
> > The impression I get from README.{clients,aix}.txt is that if your perl
> > is 64bit, or if you have Oracle 10g (which apparently comes with 32bit
> > client libraries), you don't need anything else;
>
> Is there a way to check for the client libs?
>
> The build made it to near the end; it failed w/error:
>
> --snip
> rm -f blib/arch/auto/DBD/Oracle/Oracle.so
>
> LD_RUN_PATH="/products/app/oracle/product/11.2.0/ee_1/lib:/products/app/oracle/product/11.2.0/ee_1/rdbms/lib" ld -bhalt:4 -bexpall -G -bnoentry
> -lpthreads -lc Oracle.o dbdimp.o oci8.o /usr/lib/crt0_r.o -o
> blib/arch/auto/DBD/Oracle/Oracle.so
> -L/products/app/oracle/product/11.2.0/ee_1/lib/ -lclntsh -lld -lm -ldl
> -lc -lm -lpthreads -lodm -lbsd_r -lld -lperfstat -lm -lpthreads
> ld: 0711-736 ERROR: Input file
> /products/app/oracle/product/11.2.0/ee_1/lib//libclntsh.so:
> XCOFF64 object files are not allowed in 32-bit mode.
> make: The error code from the last command is 8.
Well, that seems fairly unambiguous: the client libs appear to be there,
but they are 64bit so you can't link them with your perl. The first
section in README.aix suggests you may have 32bit libraries in
/products/app/oracle/product/11.2.0/ee_1/lib32 and .../rdbms/lib32; you
may be able to edit the Makefile to link against them instead, but tbh
it's probably easier just to install the Instant Client. (Unless that's
something you have to pay for separately?)
Ben
------------------------------
Date: Fri, 18 May 2012 08:30:41 +0100
From: Tim Watts <tw+usenet@dionic.net>
Subject: Re: Encrypted connection
Message-Id: <1eah89-o3f.ln1@squidward.local.dionic.net>
Ben Morrow wrote:
>
> Quoth Eli the Bearded <*@eli.users.panix.com>:
>> In comp.lang.perl.misc, Jens Thoms Toerring <jt@toerring.de> wrote:
>> > I'm in the planning stage of writing a server-client
>> > application for which I need good enryption of all data
>> > exchanged between the server and client. While the client-
>> > server part as such does't pose a major problem I don't
>> > have much experience with encrypting a connection.
>>
>> Net::SSLeay
>
> That's a good answer, but it's probably easier to use IO::Socket::SSL,
> which is a layer over New::SSLeay that looks (almost) just like
> IO::Socket::INET. Remember to be careful about verifying the server
> certificate, and the client cert if you use one. You don't necessarily
> need certs from a public CA: using a private self-signed CA is fine, but
> you do need to check the certificate has been properly signed by the
> right CA.
>
> Sensible alternatives include ssh, Kerberos, and using HTTPS with a web
> server to handle the server-side encryption.
>
> Ben
And to the OP - don't discount the possibility of hooking IO through an
external tool, eg:
stunnel or socat or a real ssh client. A variation on this trick is to rig
stunnel/socat (and inetd) to deal with the SSL connection and present an
unencrypted net socket (or unix domain socket) on the loopback address to
which the local client or server will connect.
It's not as neat as having the client/server program deal with it - OTOH it
may be simpler and often, simpler lessens problems that lead to security
issues.
Cheers,
Tim
--
Tim Watts
------------------------------
Date: 20 May 2012 00:09:37 GMT
From: jt@toerring.de (Jens Thoms Toerring)
Subject: Re: Encrypted connection
Message-Id: <a1qr21F9tnU1@mid.uni-berlin.de>
Hi,
thank you very much to all of you - I guess I have now
a better idea were to look first and how to get started!
Best regards, Jens
--
\ Jens Thoms Toerring ___ jt@toerring.de
\__________________________ http://toerring.de
------------------------------
Date: Sat, 19 May 2012 04:04:58 -0700 (PDT)
From: "tbb!/fbr!" <ronaldljohnson@gmail.com>
Subject: Re: First Commercial Perl Program
Message-Id: <9bbaf264-c418-4b1c-8a71-55e6f853b156@googlegroups.com>
On Thursday, May 17, 2012 12:00:15 AM UTC-7, Tim Watts wrote:
> tbb!/fbr! wrote:
>=20
> > Here's a piece of code which compares lines in one file against lines i=
n
> > the other. I mentioned earlier in the thread it was something I was
> > working on, but can't quit get it right via hashes, splits, working on =
the
> > data:
> >=20
> > foreach $line1 ( @lines1 )
> > {
> > ( $symb, $company, $excess ) =3D split( /\t/, $line1, 3 );
> >=20
> > =20
> > foreach $line2 ( @lines2 ) #
> > {
> > ( $date_y, $symbol_y, $company_y, $cap_y, $open_y, $low_y,
> > $high_y, $close_y, $pe_ratio_y, $date_div_y, $dividend_y,
> > $div_yield_y, $date_ex_div_y, $nav_y, $yield_y, $vol_y, $avg_vo=
l_y
> > ) =3D split(/\t/, $line2 );
> > if ( $symb eq $symbol_y )
> > { =20
> > print
> > =20
> "$symb\t$company\t$cap_y\t$open_y\t$low_y\t$high_y\t$close_y\t$vol_y\t$av=
g_vol_y\t$excess\n";
> > print FILEOUT1
> >=20
> "$symb\t$company\t$cap_y\t$open_y\t$low_y\t$high_y\t$close_y\t$vol_y\t$av=
g_vol_y\t$excess\n";
> > }
> > }
> >=20
> > }
> >=20
> > It was mentioned to me that there is a couple of ways to do this. Can I
> > get some input/help on making this piece of code a little more
> > streamlined.
> >=20
> > Ron
>=20
> Aside from Ben's excellent comments, what exactly isn't working?
it works fine and does exactly what it was suppose to do. I was just lookin=
g for ways to streamline it. Additionally, as I am learning perl, a few fol=
ks mentioned loading one of the files in a hash (@lines1 is 1 file and @lin=
es2 is another file) and then looping through that. Taking a line from the =
first file, and then comparing it to every line in the next file means that=
the second file is being read x(times) for the number of lines in the firs=
t file. Was just looking to learn a more efficient way of doing this. The =
first file is only 400k or so, but the other file is 4m. I'm playing with w=
hat Ben showed me, but I know the comparing against a hash is probably the =
best way to do this and I'm not proficient enough at perl yet to do things =
in a sophisticated (heh) fashion, so I wrote it the was I did understand it=
with the two foreach loops.=20
Ron
------------------------------
Date: Fri, 18 May 2012 02:29:07 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: Net::SSH::Expect
Message-Id: <38lg89-and.ln1@anubis.morrow.me.uk>
Quoth Nene <rodbass63@gmail.com>:
>
> Ok, I found the error it's producing: Cannot open a pty at /usr/local/
> share/perl5/Net/SSH/Expect.pm line 120
> I have installed: IO::Pty is up to date (1.10).
This error appears to come from IO::Pty, if pty_allocate fails.
pty_allocate is an XS function, but it looks to me as though if it's
going to fail it should produce some warnings telling you exactly what
went wrong. Is there anything like that (look for 'pty_allocate' in the
error log)? It's possible you need to turn on global warnings to see
these, rather than 'use warnings' (this, IMHO, is a flaw in IO::Pty).
To check this is the problem, run this as a CGI script:
use warnings;
use IO::Pty;
my @warns;
$SIG{__WARN__} = sub { push @warns, $_[0] };
$^W = 1; # turn on the global warnings flag
my ($ptyfd, $ttyfd, $ttyname) = IO::Pty::pty_allocate();
my $warns = join "", map "[$_]", @warns;
print <<CGI;
Content-type: text/plain
ptyfd: [$ptyfd]
ttyfd: [$ttyfd]
ttyname: [$ttyname]
warnings: $warns
CGI
If this were working properly, $ptyfd and $ttyfd should be small
integers; ttyname should be a convincing name for a tty on your system;
and there should be no warnings. If you get different results, post
them.
Ben
------------------------------
Date: Thu, 17 May 2012 18:42:28 -0700 (PDT)
From: Nene <rodbass63@gmail.com>
Subject: Re: Net::SSH::Expect
Message-Id: <ee8b56d3-49a8-47a0-a9ff-4ccf3feed515@eh4g2000vbb.googlegroups.com>
On May 17, 9:29=A0pm, Ben Morrow <b...@morrow.me.uk> wrote:
> Quoth Nene <rodbas...@gmail.com>:
>
>
>
> > Ok, I found the error it's producing: =A0Cannot open a pty at /usr/loca=
l/
> > share/perl5/Net/SSH/Expect.pm line 120
> > I have installed: IO::Pty is up to date (1.10).
>
> This error appears to come from IO::Pty, if pty_allocate fails.
> pty_allocate is an XS function, but it looks to me as though if it's
> going to fail it should produce some warnings telling you exactly what
> went wrong. Is there anything like that (look for 'pty_allocate' in the
> error log)? It's possible you need to turn on global warnings to see
> these, rather than 'use warnings' (this, IMHO, is a flaw in IO::Pty).
>
> To check this is the problem, run this as a CGI script:
>
> =A0 =A0 use warnings;
> =A0 =A0 use IO::Pty;
>
> =A0 =A0 my @warns;
> =A0 =A0 $SIG{__WARN__} =3D sub { push @warns, $_[0] };
> =A0 =A0 $^W =3D 1; # turn on the global warnings flag
>
> =A0 =A0 my ($ptyfd, $ttyfd, $ttyname) =3D IO::Pty::pty_allocate();
> =A0 =A0 my $warns =3D join "", map "[$_]", @warns;
>
> =A0 =A0 print <<CGI;
> =A0 =A0 Content-type: text/plain
>
> =A0 =A0 ptyfd: =A0 =A0 =A0[$ptyfd]
> =A0 =A0 ttyfd: =A0 =A0 =A0[$ttyfd]
> =A0 =A0 ttyname: =A0 =A0[$ttyname]
> =A0 =A0 warnings: =A0 $warns
> =A0 =A0 CGI
>
> If this were working properly, $ptyfd and $ttyfd should be small
> integers; ttyname should be a convincing name for a tty on your system;
> and there should be no warnings. If you get different results, post
> them.
>
> Ben
I found the fix.
I had to disable SElinux with:
echo 0 > /selinux/enforce
Thank you everybody.
------------------------------
Date: Fri, 18 May 2012 16:06:27 +0000 (UTC)
From: tmcd@panix.com (Tim McDaniel)
Subject: Re: Net::SSH::Expect
Message-Id: <jp5s23$eja$1@reader1.panix.com>
In article <38lg89-and.ln1@anubis.morrow.me.uk>,
Ben Morrow <ben@morrow.me.uk> wrote:
>It's possible you need to turn on global warnings to see
>these, rather than 'use warnings' (this, IMHO, is a flaw in IO::Pty).
>
>To check this is the problem, run this as a CGI script:
>
> use warnings;
...
> $^W = 1; # turn on the global warnings flag
Would you please explain further? I've never used $^W, and from the
few references I've seen and even the perlvar doc, I thought that it
was equivalent to "use warnings".
--
Tim McDaniel, tmcd@panix.com
------------------------------
Date: Fri, 18 May 2012 12:10:38 -0700
From: Jim Gibson <jimsgibson@gmail.com>
Subject: Re: Net::SSH::Expect
Message-Id: <180520121210387141%jimsgibson@gmail.com>
In article <jp5s23$eja$1@reader1.panix.com>, Tim McDaniel
<tmcd@panix.com> wrote:
> In article <38lg89-and.ln1@anubis.morrow.me.uk>,
> Ben Morrow <ben@morrow.me.uk> wrote:
> >It's possible you need to turn on global warnings to see
> >these, rather than 'use warnings' (this, IMHO, is a flaw in IO::Pty).
> >
> >To check this is the problem, run this as a CGI script:
> >
> > use warnings;
> ...
> > $^W = 1; # turn on the global warnings flag
>
> Would you please explain further? I've never used $^W, and from the
> few references I've seen and even the perlvar doc, I thought that it
> was equivalent to "use warnings".
From 'perldoc perlvar':
"$WARNING
$^W The current value of the warning switch, initially true if -w
was used, false otherwise, but directly modifiable. (Mnemonic:
related to the -w switch.) See also warnings."
Looks to me like it is more akin to having '-w' in your shebang line,
so it turns on warnings in use'd modules.
--
Jim Gibson
------------------------------
Date: Fri, 18 May 2012 21:39:59 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: Net::SSH::Expect
Message-Id: <vloi89-5ah1.ln1@anubis.morrow.me.uk>
Quoth tmcd@panix.com:
> In article <38lg89-and.ln1@anubis.morrow.me.uk>,
> Ben Morrow <ben@morrow.me.uk> wrote:
> >It's possible you need to turn on global warnings to see
> >these, rather than 'use warnings' (this, IMHO, is a flaw in IO::Pty).
> >
> >To check this is the problem, run this as a CGI script:
> >
> > use warnings;
> ...
> > $^W = 1; # turn on the global warnings flag
>
> Would you please explain further? I've never used $^W, and from the
> few references I've seen and even the perlvar doc, I thought that it
> was equivalent to "use warnings".
$^W is equivalent to the -w flag, rather than to 'warnings'. (In fact,
all the -w flag does is set $^W to 1.) While 'warnings' is usually
preferable, since its effects are lexically scoped, the C part of
IO::Pty specifically checks $^W (which is called PL_dowarn in C) rather
than using the newer XS warning interfaces which honour the 'warnings'
settings of the caller. This is probably simply because the code
predates 'warnings', and noone's bothered to update it.
In fact, most of the command-line flags have an equivalent magic
variable:
-0 $/
-C ${^UNICODE}, though this is readonly after perl startup
-c $^C
-d $^P, though -d does more than just set $^P
-D $^D
-i $^I
-I @INC
-l $\, though -l also does autochomping
-T/-t ${^TAINT}, though this is readonly after perl startup
-w $^W
-[npaFmMuE] can be otherwise easily implemented in Perl; -S and -x are
specific to finding the start of the program and so can't be; -e *can*
be emulated, though it's not entirely straightforward; -[hvV] instruct
perl to do something other than run a Perl program; which leaves just
-[WXU] as switches with no Perl equivalent.
Ben
------------------------------
Date: Sat, 19 May 2012 02:21:31 +0000 (UTC)
From: tmcd@panix.com (Tim McDaniel)
Subject: Re: Net::SSH::Expect
Message-Id: <jp703a$gqb$1@reader1.panix.com>
In article <vloi89-5ah1.ln1@anubis.morrow.me.uk>,
Ben Morrow <ben@morrow.me.uk> wrote:
>$^W is equivalent to the -w flag, rather than to 'warnings'. (In fact,
>all the -w flag does is set $^W to 1.) While 'warnings' is usually
>preferable, since its effects are lexically scoped,
I guess things don't percolate down into used modules. At a quick
glance, I don't see where perlfunc use or require say that it's done
in a separate lexical scope in which the user/requirer is invisible,
unless BEGIN (done by use) does it.
Thank you for the explanation.
--
Tim McDaniel, tmcd@panix.com
------------------------------
Date: Sat, 19 May 2012 16:45:08 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: Net::SSH::Expect
Message-Id: <4prk89-u0s1.ln1@anubis.morrow.me.uk>
Quoth tmcd@panix.com:
> In article <vloi89-5ah1.ln1@anubis.morrow.me.uk>,
> Ben Morrow <ben@morrow.me.uk> wrote:
> >$^W is equivalent to the -w flag, rather than to 'warnings'. (In fact,
> >all the -w flag does is set $^W to 1.) While 'warnings' is usually
> >preferable, since its effects are lexically scoped,
>
> I guess things don't percolate down into used modules. At a quick
> glance, I don't see where perlfunc use or require say that it's done
> in a separate lexical scope in which the user/requirer is invisible,
> unless BEGIN (done by use) does it.
It's exactly the same as 'my' variables not being visible in required
files. It's not to do with the BEGIN: 'do', 'require' and 'use' all
start a fresh lexical scope, with no lexical variables visible and
'strict', 'warnings' and 'feature' all off.
In fact, a plain BEGIN inherits the lexical scope outside it:
use warnings;
my $x;
BEGIN {
# warnings are on here
# $x is visible here
require Foo;
}
## Foo.pm
package Foo;
# warnings are off here
# $x is not visible here
That's what the 'lexical' bit means: 'lexical' means 'to do with text',
and a lexical scope only extends over the bits of code which are
textually inside it.
Ben
------------------------------
Date: Sat, 19 May 2012 23:42:07 +0000 (UTC)
From: tmcd@panix.com (Tim McDaniel)
Subject: Re: Net::SSH::Expect
Message-Id: <jp9b4f$eh9$1@reader1.panix.com>
In article <4prk89-u0s1.ln1@anubis.morrow.me.uk>,
Ben Morrow <ben@morrow.me.uk> wrote:
>It's exactly the same as 'my' variables not being visible in required
>files. It's not to do with the BEGIN: 'do', 'require' and 'use' all
>start a fresh lexical scope, with no lexical variables visible and
>'strict', 'warnings' and 'feature' all off.
...
>That's what the 'lexical' bit means: 'lexical' means 'to do with
>text', and a lexical scope only extends over the bits of code which
>are textually inside it.
OK. I had been thinking of "do" being like, for example, "#include"
in C or "eval" in perl, but it's not. I had tried to look this up for
myself in "require" and "use" in perlfunc, but not "do". Having just
done so, I see
do 'stat.pl';
is just like
eval `cat stat.pl`;
except that ... It also differs in that code evaluated with "do
FILENAME" cannot see lexicals in the enclosing scope; "eval
STRING" does.
Thanks for pointing me at the final bit of the docco.
--
Tim McDaniel, tmcd@panix.com
------------------------------
Date: Fri, 18 May 2012 19:50:46 +0200
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: Objective C (OT)
Message-Id: <slrnjrd2vm.jql.hjp-usenet2@hrunkner.hjp.at>
On 2012-05-17 20:51, Shmuel Metz <spamtrap@library.lspace.org.invalid> wrote:
> In <Peadnc1DmNuYIC7SnZ2dnUVZ7t-dnZ2d@brightview.co.uk>, on 05/16/2012
> at 03:43 PM, bugbear <bugbear@trim_papermule.co.uk_trim> said:
>
>>Shmuel (Seymour J.) Metz wrote:
>>> In<qhsa89-6vg2.ln1@anubis.morrow.me.uk>, on 05/15/2012
>>> at 09:56 PM, Ben Morrow<ben@morrow.me.uk> said:
>
>>> Learning C will not give you a sense of what is actually being
>>> executed at the machine code level.
>>Counter example: it did for me.
>
> How did learning C teach you, e.g., the register structure of an Intel
> x86 processor?
By reading the output of "cc -S" :-).
Seriously: While it is difficult in retrospect to determine what was the
greatest influence (I already knew BASIC, Pascal and a bit of Z-80 and
6502 assembler, and it was the first semester of CS, so I also attended
a lot of introductory courses), I do think that C is just low-level
enough that by comparing the C source code and the generated machine
code you can get a "feeling" for common high-level language constructs
are translated into machine code. I didn't see the connection between
pointers in Pascal and addresses in 6502 assembler, but when I learned
C, it became clear to me.
As an introductory language, "Processing"[1] might be a good choice. I
haven't really used it but I played around with it a bit and it reminded
me of my BASIC days: You can get pretty fast to the point where can
produce simple graphics, little games, etc. I think that's important for
children. (Perl is similarly simple[2] as long as you stay with text -
but there is no simple graphics interface)
hp
[1] http://processing.org/
[2] I think it was Horshack who talked about the virtues of "baby perl"
on the first Vienna Perl workshop.
--
_ | Peter J. Holzer | Deprecating human carelessness and
|_|_) | Sysadmin WSR | ignorance has no successful track record.
| | | hjp@hjp.at |
__/ | http://www.hjp.at/ | -- Bill Code on asrg@irtf.org
------------------------------
Date: Fri, 18 May 2012 23:47:40 +0200
From: Martijn Lievaart <m@rtij.nl.invlalid>
Subject: Re: Objective C (OT)
Message-Id: <sksi89-hj8.ln1@news.rtij.nl>
On Fri, 18 May 2012 19:50:46 +0200, Peter J. Holzer wrote:
> Seriously: While it is difficult in retrospect to determine what was the
> greatest influence (I already knew BASIC, Pascal and a bit of Z-80 and
> 6502 assembler, and it was the first semester of CS, so I also attended
> a lot of introductory courses), I do think that C is just low-level
> enough that by comparing the C source code and the generated machine
> code you can get a "feeling" for common high-level language constructs
> are translated into machine code. I didn't see the connection between
> pointers in Pascal and addresses in 6502 assembler, but when I learned
> C, it became clear to me.
May be I was more ready for it at that time, but for me as well, C made
me understand Pascal pointers.
M4
------------------------------
Date: Thu, 17 May 2012 19:50:05 -0400
From: Shmuel (Seymour J.) Metz <spamtrap@library.lspace.org.invalid>
Subject: Re: WWW::Mechanize and 3rd party APIs (Google)
Message-Id: <4fb58ead$8$fuzhry+tra$mr2ice@news.patriot.net>
>That's, at least partly, the point. How do you (not you personally,
>Ben) reach potential customers?
Other than the legitimate bulk approaches, e.g., advertising, being
visible at conferences, you send messages that show that you are aware
of the needs of the particular business you are contacting. Not the
needs of some target list, not the needs of an industry, but the needs
of that one business.
In <g1ue89-fvb.ln1@zem.masonsmusic.co.uk>, on 05/17/2012
at 10:46 AM, Justin C <justin.1203@purestblue.com> said:
>Or we can pin-point businesses meeting a strict criteria and
>reach, with surgical precision, businesses that exactly match
>the type that are our customers already.
Unsolicted bulk e-mail is spam. You can count on complaints to your
provider and on being added to permanent blacklists if you spam.
--
Shmuel (Seymour J.) Metz, SysProg and JOAT <http://patriot.net/~shmuel>
Unsolicited bulk E-mail subject to legal action. I reserve the
right to publicly post or ridicule any abusive E-mail. Reply to
domain Patriot dot net user shmuel+news to contact me. Do not
reply to spamtrap@library.lspace.org
------------------------------
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:
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
Back issues are available via anonymous ftp from
ftp://cil-www.oce.orst.edu/pub/perl/old-digests.
#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 V11 Issue 3693
***************************************