[32425] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 3692 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu May 17 21:09:27 2012

Date: Thu, 17 May 2012 18:09:07 -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           Thu, 17 May 2012     Volume: 11 Number: 3692

Today's topics:
    Re: btree <tzz@lifelogs.com>
        Encrypted connection (Jens Thoms Toerring)
    Re: Encrypted connection <*@eli.users.panix.com>
    Re: Encrypted connection <ben@morrow.me.uk>
    Re: First Commercial Perl Program <ronaldljohnson@gmail.com>
    Re: First Commercial Perl Program <ben@morrow.me.uk>
    Re: First Commercial Perl Program <tw+usenet@dionic.net>
        Net::SSH::Expect <rodbass63@gmail.com>
    Re: Net::SSH::Expect <ben@morrow.me.uk>
    Re: Net::SSH::Expect <rodbass63@gmail.com>
    Re: Net::SSH::Expect <rodbass63@gmail.com>
    Re: Objective C (OT) (Seymour J.)
        Providing default values (missing?) in Getopt::Declare  mathematisch@gmail.com
    Re: Taint mode help <dave@invalid.invalid>
    Re: Taint mode help (Seymour J.)
    Re: what is the meaning of $:: ? <rweikusat@mssgmbh.com>
    Re: what is the meaning of $:: ? <ben@morrow.me.uk>
    Re: what is the meaning of $:: ? <ssungle@gmail.com>
    Re: WWW::Mechanize and 3rd party APIs (Google) <justin.1203@purestblue.com>
    Re: WWW::Mechanize and 3rd party APIs (Google) <mvdwege@mail.com>
    Re: WWW::Mechanize and 3rd party APIs (Google) (Randal L. Schwartz)
    Re: WWW::Mechanize and 3rd party APIs (Google) <justin.1203@purestblue.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Wed, 16 May 2012 11:30:34 -0400
From: Ted Zlatanov <tzz@lifelogs.com>
Subject: Re: btree
Message-Id: <87fwb02let.fsf@lifelogs.com>

On Mon, 14 May 2012 14:46:05 +0800 XeCycle <XeCycle@Gmail.com> wrote: 

X> Use Berkeley DB, dude.

cfengine (a configuration management tool I use) switched from Berkeley
DB to Tokyo Cabinet recently, and I had a chance to look at TC.  It's a
good C kv database with good performance and has a Perl API.  It
compares well to Berkeley DB, especially in capacity and bug density,
so maybe it's useful to others too.  Take a look at their site,
http://fallabs.com/tokyocabinet/

They also offer Kyoto Cabinet, a C++ successor to TC, but my experience
with C++ portability and readability has been less pleasant...

Ted


------------------------------

Date: 17 May 2012 21:29:15 GMT
From: jt@toerring.de (Jens Thoms Toerring)
Subject: Encrypted connection
Message-Id: <a1l8tbFniU1@mid.uni-berlin.de>

Hi,

   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. I have
done quite a bit of reading and checking what's available
on CPAN, but I haven't yet a good idea about the best way
to do it. Some packages seem to only cover the client side,
others have rather mixed reviews etc. I guess several peo-
ple here have been doing this kind of stuff for years and
years and I would be really grateful for all pointers and
recommendations.
                   Thanks and best regards, Jens
-- 
  \   Jens Thoms Toerring  ___      jt@toerring.de
   \__________________________      http://toerring.de


------------------------------

Date: Thu, 17 May 2012 22:01:44 +0000 (UTC)
From: Eli the Bearded <*@eli.users.panix.com>
Subject: Re: Encrypted connection
Message-Id: <eli$1205171754@qz.little-neck.ny.us>

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

DESCRIPTION
       There is a related module called "Net::SSLeay::Handle" included
       in this distribution that you might want to use instead. It has
       its own pod documentation.

       This module offers some high level convinience functions for
       accessing web pages on SSL servers (for symmetry, same API is
       offered for accessing http servers, too), a "sslcat()" function
       for writing your own clients, and finally access to the SSL api
       of SSLeay/OpenSSL package so you can write servers or clients
       for more complicated applications.


I've only used it for Net::SSLeay::Handle clients, but it looks like
the Net::SSLeay documentation includes sample client and server code.

Elijah
------
all in favor of someone else coding the encryption bits


------------------------------

Date: Thu, 17 May 2012 23:15:08 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: Encrypted connection
Message-Id: <cs9g89-gsb.ln1@anubis.morrow.me.uk>


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



------------------------------

Date: Wed, 16 May 2012 12:47:57 -0700 (PDT)
From: "tbb!/fbr!" <ronaldljohnson@gmail.com>
Subject: Re: First Commercial Perl Program
Message-Id: <9221320.1170.1337197677913.JavaMail.geo-discussion-forums@pbcin9>

Here's a piece of code which compares lines in one file against lines in 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:

foreach $line1 ( @lines1 ) 
{
    ( $symb, $company, $excess ) = split( /\t/, $line1, 3 );

 
    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_vol_y ) = split(/\t/, $line2 );
	if ( $symb eq $symbol_y )
        {        
           print "$symb\t$company\t$cap_y\t$open_y\t$low_y\t$high_y\t$close_y\t$vol_y\t$avg_vol_y\t$excess\n";
	   print FILEOUT1 "$symb\t$company\t$cap_y\t$open_y\t$low_y\t$high_y\t$close_y\t$vol_y\t$avg_vol_y\t$excess\n";
        }
    }

}

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.

Ron


------------------------------

Date: Wed, 16 May 2012 22:23:09 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: First Commercial Perl Program
Message-Id: <teid89-j6v2.ln1@anubis.morrow.me.uk>


Quoth "tbb!/fbr!" <ronaldljohnson@gmail.com>:
> Here's a piece of code which compares lines in one file against lines in
> 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:

You haven't explained what isn't working. AFAICS the code below should
do *something*; I can't tell whether or not it what you want it to do.

> foreach $line1 ( @lines1 ) 

    foreach my $line1 ( @lines1 )

Are you using 'strict'?

You should give your variables more meaningful names than '@lines1'.
What does this file actually contain?

[I've rewrapped the code below since the lines were too long; since the
wraps were inside strings it no longer does what it did. Please wrap any
posted code to 76 columns: if necessary you can divide a long string up
with .]

> {
>     ( $symb, $company, $excess ) = split( /\t/, $line1, 3 );
> 
>  
>     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_vol_y ) = split(/\t/,
> $line2 );
> 	if ( $symb eq $symbol_y )
>         {        
>            print "$symb\t$company\t$cap_y\t$open_y\t$low_y\t
>    $high_y\t$close_y\t$vol_y\t$avg_vol_y\t$excess\n";
> 	   print FILEOUT1 "$symb\t$company\t$cap_y\t$open_y\t

Don't use global bareword filehandles. Keep your filehandles in
variables: that is, instead of

    open FILEOUT, ">", ... or die ...;

write

    open my $FILEOUT, ">", ... or die ...;

and then use

    print $FILEOUT ...

later on. Also, use a meaningful name for your filehandle variables.

>    $low_y\t$high_y\t$close_y\t$vol_y\t$avg_vol_y\t$excess\n";

You can make this a lot less messy by noticing that $cap_y--$close_y and
$vol_y--$avg_vol_y stay together, so you can treat them as one field.
Also, you are printing the same string twice, so put it in a variable
rather than writing it out all over again.

    # create a pattern to match a single field, and a pattern to match a
    # field plus a delimiter
    my $f   = qr/[^\t]*/;
    my $fd  = qr/$f\t/;

    # extract the fields we want
    my ($symbol, $data, $vols) = $line2 =~ m{
        ^ $fd ($f) \t $fd ($fd{4} $f) \t $fd{7} ($fd $f) $
    }x;

    # strip the trailing tab from the field values
    s/\t$// for $symbol, $data;

    if ($symbol eq $symb) {
        my $new = join "\t", 
            $symb, $company, $data, $vols, $excess;
        print $new;
        print FILEOUT $new;
    }

An alternative would be something like this:

    # outside the loop
    my @in = qw/
        date symb company
        cap open low high close pe_ratio 
        date_div div div_yield date_ex_div
        nav yield vol avg_vol
    /;
    my @out = qw/
        cap open low high close vol avg_vol
    /;

    # inside
    my %f;
    @f{@in} = split /\t/, $line1;

    if ($f{symb} eq $symb) {
        my $new = join "\t", 
            $symb, $company, @f{@out}, $excess;
        # print as above
    }

which is likely to be more use if you want to do more processing of this
data later.

Ben



------------------------------

Date: Thu, 17 May 2012 08:00:15 +0100
From: Tim Watts <tw+usenet@dionic.net>
Subject: Re: First Commercial Perl Program
Message-Id: <v8ke89-333.ln1@squidward.local.dionic.net>

tbb!/fbr! wrote:

> Here's a piece of code which compares lines in one file against lines in
> 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:
> 
> foreach $line1 ( @lines1 )
> {
>     ( $symb, $company, $excess ) = split( /\t/, $line1, 3 );
> 
>  
>     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_vol_y
>         ) = split(/\t/, $line2 );
> if ( $symb eq $symbol_y )
>         {        
>            print
>            
"$symb\t$company\t$cap_y\t$open_y\t$low_y\t$high_y\t$close_y\t$vol_y\t$avg_vol_y\t$excess\n";
> print FILEOUT1
> 
"$symb\t$company\t$cap_y\t$open_y\t$low_y\t$high_y\t$close_y\t$vol_y\t$avg_vol_y\t$excess\n";
>         }
>     }
> 
> }
> 
> 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.
> 
> Ron

Aside from Ben's excellent comments, what exactly isn't working?

I would put some debugging print's in (or run it through a perl debugger) - 

1) print $symb, $company, $excess after the first foreach (add a next; to 
skip the inner loop) and make sure you are happy that the data is being 
"split" right.

2) Same for inner loop


If either of those datasets only have one record for each unique SYMBOL, it 
woudl be a good candidate for preloading into a hash and only looping on the 
other dataset. If both files have multiple unique SYMBOLS you could still do 
this, but it would be a hash of arrays, so a little bit fiddlier.

HTH

Tim
-- 
Tim Watts


------------------------------

Date: Thu, 17 May 2012 15:39:56 -0700 (PDT)
From: Nene <rodbass63@gmail.com>
Subject: Net::SSH::Expect
Message-Id: <232c62f1-895e-4c0a-8ac0-665bc1cf9baa@e18g2000yqc.googlegroups.com>

My variable $main::newvar , which holds a very long command will not
print to screen after '$ssh->run_ssh() or die "SSH process couldn't
start: $!";'

#!!/usr/bin/perl -w
use strict;

my $ssh = Net::SSH::Expect->new (
            host => "xxxxxxx",
            password=> 'xxxxxx',
            user => 'xxxxxx',
            raw_pty => 1
        );


print "$main::newvar\n", br;  #### It prints here...


# now start the ssh process
$ssh->run_ssh() or die "SSH process couldn't start: $!";

$ssh->waitfor('\[xxxxxxx\@a_box:Standby\].* \#', 3) or die "prompt not
found after 3 second";

print "$main::newvar\n", br; It DOES NOT print  here.....

Any help will be greatly appreciated.


------------------------------

Date: Fri, 18 May 2012 00:09:29 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: Net::SSH::Expect
Message-Id: <92dg89-ldc.ln1@anubis.morrow.me.uk>


Quoth Nene <rodbass63@gmail.com>:
> My variable $main::newvar , which holds a very long command will not
> print to screen after '$ssh->run_ssh() or die "SSH process couldn't
> start: $!";'
> 
> #!!/usr/bin/perl -w

That's not what a ~! line looks like. Also, you want

    use warnings;

rather than -w.

> use strict;
> 
> my $ssh = Net::SSH::Expect->new (
>             host => "xxxxxxx",
>             password=> 'xxxxxx',
>             user => 'xxxxxx',
>             raw_pty => 1
>         );
> 
> 
> print "$main::newvar\n", br;  #### It prints here...

Where does 'br' come from? Is this a CGI script? Please post complete
programs.

> # now start the ssh process
> $ssh->run_ssh() or die "SSH process couldn't start: $!";
> 
> $ssh->waitfor('\[xxxxxxx\@a_box:Standby\].* \#', 3) or die "prompt not
> found after 3 second";

[I *do* hope that # doesn't indicate you're logging in as root with a
password kept in a CGI script...]

> print "$main::newvar\n", br; It DOES NOT print  here.....

If this *is* a CGI script, then probably what happened is that the
->waitfor failed, the script died, and the error is in a server error
log somewhere where you haven't found it. You may find CGI::Carp
helpful, at least during development.

Ben



------------------------------

Date: Thu, 17 May 2012 17:31:05 -0700 (PDT)
From: Nene <rodbass63@gmail.com>
Subject: Re: Net::SSH::Expect
Message-Id: <007e26a6-41bf-4a66-a5ce-0dee3443f399@w24g2000vby.googlegroups.com>

On May 17, 7:09=A0pm, Ben Morrow <b...@morrow.me.uk> wrote:
> Quoth Nene <rodbas...@gmail.com>:
>
> > My variable $main::newvar , which holds a very long command will not
> > print to screen after '$ssh->run_ssh() or die "SSH process couldn't
> > start: $!";'
>
> > #!!/usr/bin/perl -w

Correct, It's a typo, I just copied and pasted the code that is giving
me trouble.
>
> That's not what a ~! line looks like. Also, you want
>
> =A0 =A0 use warnings;

Ok, thanks.
>
> rather than -w.
>
> > use strict;

It's at the top of the script.
>
> > my $ssh =3D Net::SSH::Expect->new (
> > =A0 =A0 =A0 =A0 =A0 =A0 host =3D> "xxxxxxx",
> > =A0 =A0 =A0 =A0 =A0 =A0 password=3D> 'xxxxxx',
> > =A0 =A0 =A0 =A0 =A0 =A0 user =3D> 'xxxxxx',
> > =A0 =A0 =A0 =A0 =A0 =A0 raw_pty =3D> 1
> > =A0 =A0 =A0 =A0 );
>
> > print "$main::newvar\n", br; =A0#### It prints here...
>
> Where does 'br' come from? Is this a CGI script? Please post complete
> programs.

It is a CGI script (use CGI is at the top of the page)
>
> > # now start the ssh process
> > $ssh->run_ssh() or die "SSH process couldn't start: $!";

The variable doesn't print after the run_ssh command too.

>
> > $ssh->waitfor('\[xxxxxxx\@a_box:Standby\].* \#', 3) or die "prompt not
> > found after 3 second";
The 'waitfor' is not an issue here, tested.

>
> [I *do* hope that # doesn't indicate you're logging in as root with a
> password kept in a CGI script...]

I'm not.
>
> > print "$main::newvar\n", br; It DOES NOT print =A0here.....
>
> If this *is* a CGI script, then probably what happened is that the
> ->waitfor failed, the script died, and the error is in a server error
> log somewhere where you haven't found it. You may find CGI::Carp
> helpful, at least during development.

It's not the waitfor command, it doesn't produce an error, it is
authenticating and I'm able to run system commands.
>
> Ben



------------------------------

Date: Thu, 17 May 2012 17:51:44 -0700 (PDT)
From: Nene <rodbass63@gmail.com>
Subject: Re: Net::SSH::Expect
Message-Id: <cb29c30b-eac1-4ce7-8555-40d57a96327d@8g2000vbu.googlegroups.com>

On May 17, 8:31=A0pm, Nene <rodbas...@gmail.com> wrote:
> On May 17, 7:09=A0pm, Ben Morrow <b...@morrow.me.uk> wrote:
>
> > Quoth Nene <rodbas...@gmail.com>:
>
> > > My variable $main::newvar , which holds a very long command will not
> > > print to screen after '$ssh->run_ssh() or die "SSH process couldn't
> > > start: $!";'
>
> > > #!!/usr/bin/perl -w
>
> Correct, It's a typo, I just copied and pasted the code that is giving
> me trouble.
>
>
>
> > That's not what a ~! line looks like. Also, you want
>
> > =A0 =A0 use warnings;
>
> Ok, thanks.
>
>
>
> > rather than -w.
>
> > > use strict;
>
> It's at the top of the script.
>
>
>
> > > my $ssh =3D Net::SSH::Expect->new (
> > > =A0 =A0 =A0 =A0 =A0 =A0 host =3D> "xxxxxxx",
> > > =A0 =A0 =A0 =A0 =A0 =A0 password=3D> 'xxxxxx',
> > > =A0 =A0 =A0 =A0 =A0 =A0 user =3D> 'xxxxxx',
> > > =A0 =A0 =A0 =A0 =A0 =A0 raw_pty =3D> 1
> > > =A0 =A0 =A0 =A0 );
>
> > > print "$main::newvar\n", br; =A0#### It prints here...
>
> > Where does 'br' come from? Is this a CGI script? Please post complete
> > programs.
>
> It is a CGI script (use CGI is at the top of the page)
>
>
>
> > > # now start the ssh process
> > > $ssh->run_ssh() or die "SSH process couldn't start: $!";
>
> The variable doesn't print after the run_ssh command too.
>
>
>
> > > $ssh->waitfor('\[xxxxxxx\@a_box:Standby\].* \#', 3) or die "prompt no=
t
> > > found after 3 second";
>
> The 'waitfor' is not an issue here, tested.
>
>
>
> > [I *do* hope that # doesn't indicate you're logging in as root with a
> > password kept in a CGI script...]
>
> I'm not.
>
>
>
> > > print "$main::newvar\n", br; It DOES NOT print =A0here.....
>
> > If this *is* a CGI script, then probably what happened is that the
> > ->waitfor failed, the script died, and the error is in a server error
> > log somewhere where you haven't found it. You may find CGI::Carp
> > helpful, at least during development.

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).

Below is the Expect.pm


    116         # this sets the ssh command line
    117         my $ssh_string =3D $self->{binary} . " $flags $user\@
$host";
    118
    119         # creating the Expect object
    120         my $exp =3D new Expect();
    121
    122         # saving this instance
    123         $self->{expect} =3D $exp;


>
> It's not the waitfor command, it doesn't produce an error, it is
> authenticating and I'm able to run system commands.
>
>
>
>
>
>
>
>
>
> > Ben



------------------------------

Date: Thu, 17 May 2012 16:51:34 -0400
From: Shmuel (Seymour J.) Metz <spamtrap@library.lspace.org.invalid>
Subject: Re: Objective C (OT)
Message-Id: <4fb564d6$1$fuzhry+tra$mr2ice@news.patriot.net>

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?

-- 
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: Thu, 17 May 2012 03:26:22 -0700 (PDT)
From: mathematisch@gmail.com
Subject: Providing default values (missing?) in Getopt::Declare ?
Message-Id: <24276473.2475.1337250382209.JavaMail.geo-discussion-forums@vbwa3>

Hi,

I see the fancy module "Getopt::Declare" has a lot of functions for argument parsing and other checks. BUT, something as trivial as "default value for a parameter" is not documented.

Is there anyone here who may know how one can provide a default value for the options in Getopt::Declare? I would like to use this module for its capabilities, but the apparent lack of support for default values really is annoying.

Thanks.


------------------------------

Date: Wed, 16 May 2012 19:20:45 +0000 (UTC)
From: "Dave Saville" <dave@invalid.invalid>
Subject: Re: Taint mode help
Message-Id: <fV45K0OBJxbE-pn2-QwdCe1W8edL9@localhost>

On Wed, 16 May 2012 01:43:33 UTC, Shmuel (Seymour J.) Metz 
<spamtrap@library.lspace.org.invalid> wrote:

> In <fV45K0OBJxbE-pn2-4yg05oBtBKS3@localhost>, on 05/12/2012
>    at 10:57 AM, "Dave Saville" <dave@invalid.invalid> said:
> 
> >OS/2 :-)
> 
> What release? 5.8.8 worked fine for me on a current OS/2 and I'm
> currently using 5.10; 5.14 sort of works but the remapping for
> PERLLIB_PREFIX is truncating file names.
> 

ECS 2.1 and 5.8.2. Yeah, truncation and other things. I don't want to 
do 5.8.2 to 5.10 and then have to do it all again for 5.14 when (if) 
it is fixed 

> I've had good luck installing CPAN modules on eCS 2.0 using Perl 5.10
> and Paul Smedley's build environment.
> 

Does that include C compiles?


-- 
Regards
Dave Saville


------------------------------

Date: Thu, 17 May 2012 16:55:57 -0400
From: Shmuel (Seymour J.) Metz <spamtrap@library.lspace.org.invalid>
Subject: Re: Taint mode help
Message-Id: <4fb565dd$2$fuzhry+tra$mr2ice@news.patriot.net>

In <fV45K0OBJxbE-pn2-QwdCe1W8edL9@localhost>, on 05/16/2012
   at 07:20 PM, "Dave Saville" <dave@invalid.invalid> said:

>ECS 2.1 and 5.8.2. Yeah, truncation and other things.

I never saw truncation on either 5,8,2 or 5,8.8, only on 5.14.

>Does that include C compiles?

Yes. Several of the CPAN packages I installed on 5.10 included C code.

-- 
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: Wed, 16 May 2012 16:18:58 +0100
From: Rainer Weikusat <rweikusat@mssgmbh.com>
Subject: Re: what is the meaning of $:: ?
Message-Id: <8762bwduhp.fsf@sapphire.mobileactivedefense.com>

Mathematisch <mathematisch@gmail.com> writes:
> I see this perl syntax "$::" in various scripts. What does it mean?
> i.e.
>
> $::VERSION = 0.01;
>
> What would that be written in this way?

AFAIK, a 'package global' variable in package main.


------------------------------

Date: Wed, 16 May 2012 17:27:21 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: what is the meaning of $:: ?
Message-Id: <941d89-dis2.ln1@anubis.morrow.me.uk>


Quoth Rainer Weikusat <rweikusat@mssgmbh.com>:
> Mathematisch <mathematisch@gmail.com> writes:
> > I see this perl syntax "$::" in various scripts. What does it mean?
> > i.e.
> >
> > $::VERSION = 0.01;
> >
> > What would that be written in this way?
> 
> AFAIK, a 'package global' variable in package main.

That's correct. The 'empty package' is a synonym for package main; it
behaves like a symlink /main -> / in the filesystem. So $::VERSION,
$main::VERSION and $main::main::VERSION all refer to the same variable,
and (since they are all package-qualified) will all be allowed by 'use
strict'.

Myself, I'd rather use 'our' in package main, since that matches what
you do inside a module.

Ben



------------------------------

Date: Thu, 17 May 2012 01:49:27 -0700 (PDT)
From: mingwei hu <ssungle@gmail.com>
Subject: Re: what is the meaning of $:: ?
Message-Id: <5518178.1293.1337244567493.JavaMail.geo-discussion-forums@pbcgf3>

learned it from Ben.
thanks.


------------------------------

Date: Thu, 17 May 2012 10:46:56 +0100
From: Justin C <justin.1203@purestblue.com>
Subject: Re: WWW::Mechanize and 3rd party APIs (Google)
Message-Id: <g1ue89-fvb.ln1@zem.masonsmusic.co.uk>

On 2012-05-11, Ben Morrow <ben@morrow.me.uk> wrote:
>
> If you're doing so in order to automatically email them, regardless of
> the content of those emails, then Randal is right: that's spamming.
> (Traditional spambots, such as don't appear to exist much any more, did
> nothing more than go through publically-available websites looking for
> email addresses. There were no *copyright* issues with that, which is
> what we were originally discussing, but there were and are serious
> data-protection and privacy issues.)
>
> If you're doing so in order to have a real human contact them, through
> channels normally used for that sort of communication, after properly
> considering whether the recipient would consider the communication
> appropriate, that's much more of a grey area. It is still sufficiently
> grey that you need to look *very* carefully at what you are doing,
> starting with trying to honestly picture how you would react in their
> place.

First contact will be by post, followed by a telephone call, the site
lists no email addresses, though it does list web-sites for those that
have supplied details.


> It's certainly not something *I* would want to be doing--it's a good
> deal too close to the line--but then, I'm not trying to run a business.

That's, at least partly, the point. How do you (not you personally,
Ben) reach potential customers? The trade publication for our sector
is on the verge of collapse due to lack of subscription, so that's
pointless. We have a web presence, but it's likely these businesses
aren't actively looking for us. We can advertise widely at huge cost
to try to attract a very small potential customer base, and even then
likely not even reach them. 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.

Print advertising, other than for retail, has had its day. Web
advertising only works for those looking for the service you're
offering. I don't see what I'm doing as a good deed, but nor do I see
it as bad; it's decidedly, for me, a grey area. I am, at least,
offering wholesale potatoes to green-grocers.

I think I've lost Randall for good, we're never going to see eye to
eye and I'm sorry that's the case, I have a lot of respect for him, he
taught me Perl through his "Learning Perl" book. I'm not sure I'd be
programming at all if it wasn't for his book.

I wonder how Randall feels about, in the days prior to the wide
adoption of the internet, people that chose to contact potential
customers by opening the yellow pages at the section pertaining to
their trade, and telephoning or mailing the list of contacts.

   Justin.

-- 
Justin C, by the sea.



------------------------------

Date: Thu, 17 May 2012 12:32:37 +0200
From: Mart van de Wege <mvdwege@mail.com>
Subject: Re: WWW::Mechanize and 3rd party APIs (Google)
Message-Id: <861umjw116.fsf@gaheris.avalon.lan>

Justin C <justin.1203@purestblue.com> writes:

> Web advertising only works for those looking for the service you're
> offering. 

So if they're not looking for the service you're offering, you think
it's ok to just cold-call them?

> I wonder how Randall feels about, in the days prior to the wide
> adoption of the internet, people that chose to contact potential
> customers by opening the yellow pages at the section pertaining to
> their trade, and telephoning or mailing the list of contacts.
>
I can't speak for Randall, but cold-calling was considered rude at best
even before the Internet.

Sure, in B2B scenarios it was considered marginally less rude than for
B2C scenarios, but even today many businesses specifically state that
acquisition in response to their public data is not appreciated.

Mart
-- 
"We will need a longer wall when the revolution comes."
    --- AJS, quoting an uncertain source.


------------------------------

Date: Thu, 17 May 2012 06:20:31 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: WWW::Mechanize and 3rd party APIs (Google)
Message-Id: <86obpnhrkw.fsf@red.stonehenge.com>

>>>>> "Justin" == Justin C <justin.1203@purestblue.com> writes:

Justin>  We have a web presence, but it's likely these businesses
Justin> aren't actively looking for us.

And this probably means you have a bad business model, or at least bad
SEO.

If you have something to say, please *buy advertising* in places they
are likely to see.  And make your website easy to find with google.

Don't spam.

You haven't lost me entirely... I'm only completely against you
*scraping* a site to figure out who to email or cold-call.  Both of
those are ugly ways of developing business and nearly always backfire.

I get about three emails a week that make it past my spam filter, but
are trying to develop B2B with me.  My constant reply is "I don't do
business with spammers, and if I need this service in the future, will
certainly google for it and NEVER do business with you now".  Hopefully,
they'll understand and stop.

print "Just another Perl hacker,"; # the original!

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.posterous.com/ for Smalltalk discussion


------------------------------

Date: Thu, 17 May 2012 14:42:50 +0100
From: Justin C <justin.1203@purestblue.com>
Subject: Re: WWW::Mechanize and 3rd party APIs (Google)
Message-Id: <qrbf89-9tf.ln1@zem.masonsmusic.co.uk>

On 2012-05-17, Mart van de Wege <mvdwege@mail.com> wrote:
> Justin C <justin.1203@purestblue.com> writes:
>
>> Web advertising only works for those looking for the service you're
>> offering. 
>
> So if they're not looking for the service you're offering, you think
> it's ok to just cold-call them?

I think it's no worse than the daily calls I field from companies
offering to PAT test our electrical equipment, or provide H&S
training, or handle our freight business, or produce cardboard boxes
for us, handle our foreign exchange needs, or our insurance, or
accounting, or software training, or hardware support. All of them
are cold calls and I receive them daily. Yes they are an
interruption, but I will, and do, spare considerably more time, and
am more interested when we're being offered product that sits well
with our current range. In fact, I welcome those calls. We have on at
least one occasion, received a cold call from a company with an
exclusive product we've been trying to source but been unable to
find.

   Justin.

-- 
Justin C, by the sea.


------------------------------

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 3692
***************************************


home help back first fref pref prev next nref lref last post