[11731] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5331 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Apr 8 14:07:34 1999

Date: Thu, 8 Apr 99 11:00:19 -0700
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, 8 Apr 1999     Volume: 8 Number: 5331

Today's topics:
    Re: *** FAQ: ANSWERS TO YOUR QUESTIONS! READ FIRST! Pos <jglascoe@giss.nasa.gov>
    Re: =~tr / / /; problem <cassell@mail.cor.epa.gov>
    Re: [Q] Help Needed on map (Effie Rover)
        ANNOUNCE: Y2K Update to "/bin/sh to Perl translator" (Randal L. Schwartz)
        Catching Perl-Script errors <ck@sbs.de>
    Re: Dyn-IP "wanna be" 1-liner <cassell@mail.cor.epa.gov>
        Get return parameters from IActiveScriptParse ? <mark@dasburo.com>
    Re: Help with foxbase .dbf file open <gregm@well.com>
    Re: HELP!!  ON  STRING COMPARING <cassell@mail.cor.epa.gov>
    Re: HELP!!  ON  STRING COMPARING <jglascoe@giss.nasa.gov>
    Re: Installing CPAN modules <newsposter@cthulhu.demon.nl>
        matching non-ordered string kanajan@brown.edu
        Perl and Personal Web Server <support@crosscom.com>
    Re: perldoc and PAGER (Ilya Zakharevich)
        Privacy for slaves forced to use a proxy/firewall to ac foj@nym.alias.net
    Re: Privacy for slaves forced to use a proxy/firewall t <jfrost@edstrom.com>
    Re: removing the \n at the end of a variable <cassell@mail.cor.epa.gov>
    Re: stumped on regex - someone slay the dragin - please <ericsm@iafrica.com>
    Re: stumped on regex <ericsm@shell.iafrica.com>
    Re: Thread renamed to: where to find perl programming t (Ilya Zakharevich)
    Re: using perl CGI to automatically post data to an HTM cdtoad@hotmail.com
    Re: Validating Email addresses (Larry Rosler)
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: Thu, 08 Apr 1999 13:34:50 -0400
From: Jay Glascoe <jglascoe@giss.nasa.gov>
To: Nathan Torkington <gnat@frii.com>
Subject: Re: *** FAQ: ANSWERS TO YOUR QUESTIONS! READ FIRST! Posted Twice Weekly  ***
Message-Id: <370CE8BA.3F73449@giss.nasa.gov>

[courtesy copy of post sent to gnat]

gnat@frii.com wrote:
> 
> 1. The latest stable release of Perl is 5.005_02.  The latest

latest_is_5.005_03 (as of April 1st)

	Jay Glascoe


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

Date: Thu, 08 Apr 1999 10:44:04 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: =~tr / / /; problem
Message-Id: <370CEAE4.37F0973E@mail.cor.epa.gov>

Larry Rosler wrote:
> 
> [Posted and a courtesy copy sent.]
> 
> In article <x73e2bu511.fsf@home.sysarch.com> on 08 Apr 1999 00:09:46 -
> 0400, Uri Guttman <uri@home.sysarch.com >says...
> > >>>>> "G" == George  <fred222@mauimail.com> writes:
> >
> >   G> I just thought I'd explain a little more.  The tr/// operator is
> >   G> the "transliterate" operator.  It lets you, for instance, switch
> >
> > s/transliterate/translate/
> >
> > transliterate means spelling a word in one human language so it sounds
> > like one in another, e.g. almost anything you see written using english
> > syllables from chinese or hebrew (my name being transliterated from
> > hebrew).

Mine too.
 
> I hate to disagree with my respected co-author, but you've got this
> wrong.  Either that, or so do I and so do the authors of the Perl docs.

Technically, I would have to side with Uri on this.  I quote the
definition of transliterate from Webster's: "to represent or spell in
the characters of *another* alphabet."  [emphasis mine]
Still, we know that in the computer world words do not always mean the
same thing as in the real world.  Said 'SCSI' to anyone lately?  :-)
Hence the 'word' technobabble.

> This is from perlop:
> 
>    tr{}{}    Transliteration
> 
> and similarly for the entries in perlfunc:
> 
>    tr///
>        The transliteration operator. Same as y///. See perlop.

True, but I quote here from the SunOs and Slowlaris manpages:
tr(1)                     User Commands                     tr(1)

NAME
     tr - translate characters

And on the gripping hand, in Dougherty's "Sed and Awk" y is called 
the transform command.  Not translate or transliterate.

Perhaps we could just agree to disagree?  This seems to be veering into
another folk etymology discussion.
 
> To trans*liter*ate means to change letters, which is what tr/// does.
> As do your natural-language examples.
> 
> >   G> A's to letter B's, and all the B's to A's (this isn't possible with the
> >   G> s///, or substitute, operator).
> >
> > as larry showed, it is possible with s/// but slower and clumsier.
> 
> I thought one of the problems might be the conditional, so I replaced it
> with a hash lookup (the hash being initialized outside the benchmark
> loop).  There was no speed difference.  Further benchmarking shows the
> time about evenly split between the regex and the substitution, if any.
> 
> >                 t///
> > is meant just for that simple function and to do it fast. you actually
> > see many newbies doing things with s/// that would be better with t///
> > like squeezing multiple spaces to one, etc.
> 
> Not only newbies.  Also people who answer questions on this list.  But
> maybe those sets aren't as disjoint as they should be.  :-)

Certainly not in my case.  :-)

> --
> (Just Another Larry) Rosler
> Hewlett-Packard Company
> http://www.hpl.hp.com/personal/Larry_Rosler/
> lr@hpl.hp.com

David
-- 
David Cassell, OAO                               
cassell@mail.cor.epa.gov
Senior Computing Specialist                          phone: (541)
754-4468
mathematical statistician                              fax: (541)
754-4716


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

Date: Thu, 08 Apr 1999 17:25:32 GMT
From: null@effierover.com (Effie Rover)
Subject: Re: [Q] Help Needed on map
Message-Id: <370ce610.269649496@news.iinc.com>

On Tue, 06 Apr 1999 10:11:55 -0700, "David L. Cassell"
<cassell@mail.cor.epa.gov> wrote:

>But to be fair, map() is non-trivial for a lot of people.  Not
>everyone has a CS background and experience with lisp.  My advice
>is to start with the docs that come with Perl, but then be prepared
>to go to DejaNews and look through old c.l.p.m. posts for examples.

I have had experience with lisp (14 years ago :-) but had flushed it
out of my brain after graduation. This and the examples are helping;
now I have to play - thank you much!

  -- Loy

Loy Ellen Gross AKA Effie Rover
The email address above goes straight to /dev/null :-)
effie -at- effierover -dot- com * http://www.effierover.com
Effie Rover's Fantasy Role Playing Gamer's Library
---------------------------------------------------------------
Protect privacy, boycott Intel: http://www.bigbrotherinside.org
---------------------------------------------------------------


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

Date: 8 Apr 1999 17:40:35 GMT
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: ANNOUNCE: Y2K Update to "/bin/sh to Perl translator"
Message-Id: <7eipmj$b56$1@play.inetarena.com>


I have released an update to my famous "sh2perl" translator, in light
of the concern about Y2K compliance in all software.  For those of you
that didn't see the original announcement, I've included it below, but
have adjusted the filenames to match the new update.

================================================== original announcement:

Yes!  Finally!  The long-awaited "Shell to Perl" translator is now available!

Works just like the a2p and s2p tools provided with the Perl
distribution.  Input a /bin/sh script, and output a Perl program!  The
result can even be compiled with Malcolm Beattie's "Perl Compiler" to
create a binary distribution, in theory (I haven't tested that yet).

Available in the CPAN at

	CPAN/authors/id/MERLYN/sh2perl-0.03.tar.gz

at URLs such as:

	http://www.perl.com/CPAN/authors/id/MERLYN/sh2perl-0.03.tar.gz
	http://www.perl.org/CPAN/authors/id/MERLYN/sh2perl-0.03.tar.gz
	http://cpan.perl.org/authors/id/MERLYN/sh2perl-0.03.tar.gz

It can also be installed directly from CPAN.pm as:

	$ perl -MCPAN -eshell
	cpan> install MERLYN/sh2perl-0.03.tar.gz

It's still in development (hence the low version number).. if you can
think of things to make it better, let me know.  Doesn't handle csh
yet (read the docs for details).

Yours for a better Perl world,

-- 
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me



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

Date: Thu, 8 Apr 1999 19:50:37 +0200
From: "Carsten B. Kinder" <ck@sbs.de>
Subject: Catching Perl-Script errors
Message-Id: <7eipun$68q$1@news.fth.sbs.de>

Hi@all

I am running perlscript-code within a active server page. I am accessing the
eventlog by that way an show parts of the eventlog in my page. The problem
is to catch the error if something goes wrong during opening the eventlog. I
get back an errormsg like ASP 80004005 instead of my own errormsg. What do I
have to change that the script shows MY message?

  if (! ($EventLog = new Win32::EventLog("$eventlog", "$machine"))) {
    #
    # never reached !!!
    #
   $Response->Write("Can't open Eventlog at $machine");
}





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

Date: Thu, 08 Apr 1999 10:26:52 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Dyn-IP "wanna be" 1-liner
Message-Id: <370CE6DC.999E47D9@mail.cor.epa.gov>

Matthew Bafford wrote:
> 
> 7 Apr 1999 22:25:17 GMT -- Andrew Allen <ada@fc.hp.com>:
> -> Hmmm... I'm confused. Why do you need to "de-dupe" if you're going to
> -> use the first element anyways... looks like another '\.' crept in after
> -> the final "255". Also, couldn't the IP start with a single 1-9
> -> digit, needing '[1-9]\d*' instead of '[1-9]\d+'?
> 
> *shrug* his code -- I barely even looked at it... :-)

I'm not laughing, since I in essence did exactly that earlier this week.
I'm still hearing about it.  :-)

> Yep, another \. slipped in.
> 
> IPs could start with a single digit, I guess.  Never looked at the
> RFC, to tell you the truth.  Again, his code.

I like \d{1,3} myself.  Could be one digit, or two, or three.  But no
more.
Like the examples below.
 
> Also, the -Mstrict doesn't work like I thought.  Not sure how that
> slipped by me.
> 
> -> Unfortunately, I don't any 'route' output available, but it seems like
> -> you should be able to replace
> 
> One of the lines:
> 
> 216.98.0.30     0.0.0.0         255.255.255.255 UH    0      0        0 ppp0
> 
> ->   map{/([1-9]\d*\.\d+\.\d+\.\d+)/}grep{/ppp/}map{split/s+/}
> ->
> -> with something like
> ->
> ->   /ppp[^s]*([1-9]\d*(?:\.\d+){3})/g
> ->
> -> (or maybe the 'ppp' is after, I don't know--are you really splitting
> -> on the letter 's'???). I guess these suggestions yield:
> 
> perldoc perlre
> 
> The \s is any whitespace.

But you lost the `\' in front of the `s'.  I think that's where the
confusion lies.

> -> #!/usr/bin/perl -wl -Mstrict
> -> print+(grep{!/(255\.){3}255/}`/sbin/route-n`=~/ppp[^s]*([1-9]\d*(?:\.\d+){3})/g)[0];
> 
> Doesn't do the same thing at all...
> 
> $ perl ./andrew_huh
> 5.255.255.255
> $ perl ./matthew_huh
> 216.98.0.30
> $
> 
> Really, if I was going to write the same thing, I'd probably do:
> 
> #!/usr/bin/perl -w
> print "216.98.0.30\n";
> 
> Since route doesn't give you your IP address, rather the address
> you're sending all your data to (ie: your ISP's).  Mine hasn't
> changed in about 2 years.
> 
> If you want your IP address, you want the script to be short, and
> insist on using an external command, how about:
> 
> #!/usr/bin/perl -w -n -l -000
> BEGIN{@ARGV='/sbin/ifconfig|'} next if !
> /^p/;print+(/((\d+\.){3}\d+)/gx)[0];exit
> 
> or maybe:
> 
> #!/usr/bin/perl -w -a -n -U -l -000
> BEGIN{@ARGV='/sbin/ifconfig ppp0|'}
> print+(/((\d+\.){3}\d+)/xg)[0];exit
> 
> This also has the very great advantage of being a perfect block!
> Unfortunatly for this thread, it's not that obfuscated.

Well, it does have that unnecessary /x modifier on the third line, so
you can count that.  :-)
 
> Hope This Helps!
> 
> -> Andrew
> 
> --Matthew

and David
-- 
David Cassell, OAO                               
cassell@mail.cor.epa.gov
Senior Computing Specialist                          phone: (541)
754-4468
mathematical statistician                              fax: (541)
754-4716


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

Date: Thu, 08 Apr 1999 19:45:22 +0000
From: Mark =?iso-8859-1?Q?M=FCller?= <mark@dasburo.com>
To: mark@dasburo.com
Subject: Get return parameters from IActiveScriptParse ?
Message-Id: <370D0752.E46904E9@dasburo.com>

Hi,

I've made a VC++ Application which is an Active Scripting Host.

Running scripts works (tested with PerlScript and JScript).
Now I want to get results from calling functions on the script side.
The following works with JScript:

function foo()
{
 return "Foo\r\n";
}

After calling IActiveScriptParse::ParseScriptText the result "FOO\r\n"
is in the pvarResult parameter.


Then I tried the same with PerlScript:
sub foo
{
 return "Foo\r\n";
}

This time the pvarResult is not filled, also the function is called
correctly.



Anybody knows why ?

Best Regards,

Mark


--
Mark M|ller
mailto:mark@dasburo.com
call: 030/69 03 55 - 0
fax: 030/69 03 55 - 34




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

Date: Thu, 08 Apr 1999 10:44:16 -0700
From: Greg McCann <gregm@well.com>
To: Jeff Slutzky <jslutzk@uswest.com>
Subject: Re: Help with foxbase .dbf file open
Message-Id: <370CEAF0.B331C616@well.com>

Jeff Slutzky wrote:
> 
> Can some point me in the direction of some comprehensive documentation
> on writing to foxbase .dbf files using XBase on a SCO 5.0 operating
> system.
> 
> Jeff Slutzky

I haven't actually done this, but it looks like DBD::XBase might do what you
want.

http://www.fi.muni.cz/~adelton/perl/man3/DBD::XBase.html

Greg

-- 

======================
Gregory McCann
http://www.calypteanna.com

"Be kind, for everyone you meet is fighting a great battle."  Saint Philo of
Alexandria


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

Date: Thu, 08 Apr 1999 10:14:19 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: HELP!!  ON  STRING COMPARING
Message-Id: <370CE3EB.C2604291@mail.cor.epa.gov>

lufan@hotmail.com wrote:
> 
> hi all,
> 
> I want to filter out a set of string I don't want
> to write to a file by implementing a solution like this,
> 
> - filter.log contains lines of string to FILTER OUT,
> 123abcd
> 1234a
> kdfkdfj
> dfkfdsfd
> ...
> ...
> 
> filter.log is read by a program like this
> 
>   open(linkf,"./$linkfilter_file");

Oops.  You didn't check whether your open() worked.  It's always a
good idea.

>   @filter_a=<linkf>;

Each line still has a newline on the end of it.  This is probably
the reason for your match-nonmatch problem below.  Read up on
chomp().

chomp @filter_a;

>   close(linkf);

And you should check the return here too.  Just to be sure.

> during this program I doing the comparing,
> 
> sub skip_this_link{
> 
>     my($linkname)=@_;
>     $ii = scalar (@filter_a);
>     foreach($i=0; $i<$ii ;$i++){
>           $filter_name = @filter_a[$i];
>     #     $filter_name = ~s/[\B|\b|\n|\r|\t|\s*|\0]//g;
>           if ($linkname=~/$filter_name/ ){   # <----- trouble is here
>                   return 1;   # matched
>           }
>     }
> 
>     return 0;   # NOT MATCHED
> }
> 
> As <--- points,
> 
> $linkname=~/$filter_name/ always CAN'T match the linkname that
> contains the filter string even they are identical as print out.
> 
> But $filtername=~/$linkname/  works as a part of the work I want.
> 
> I wonder if there is any tail char in filter string while
> read from the filter.log, thus the the string comparing does not
> work. Will appreciate if you could provide a solution for this.

Bingo!  See my comments above.

Now let me make another suggestion.  The best way to get the
difference or intersection of two arrays is given in the FAQ.
Look in perlfaq4 for the question "How do I compute the difference
of two arrays?  How do I compute the intersection of two arrays?"
The solution there will be a lot faster.
 
> THANKS
> 
> lufan

-- 
David Cassell, OAO                               
cassell@mail.cor.epa.gov
Senior Computing Specialist                          phone: (541)
754-4468
mathematical statistician                              fax: (541)
754-4716


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

Date: Thu, 08 Apr 1999 13:30:47 -0400
From: Jay Glascoe <jglascoe@giss.nasa.gov>
To: lufan@hotmail.com
Subject: Re: HELP!!  ON  STRING COMPARING
Message-Id: <370CE7C7.3AEC6384@giss.nasa.gov>

[courtesy copy of post sent to cited author]

lufan@hotmail.com wrote:
> 
> sub skip_this_link{
> 
>     my($linkname)=@_;
>     $ii = scalar (@filter_a);
>     foreach($i=0; $i<$ii ;$i++){
>           $filter_name = @filter_a[$i];

I think you mean "$filter_a[$i]".  You've written it
as an array "slice".  In scalar context, the length of
your slice, namely 1, is returned.

>     #     $filter_name = ~s/[\B|\b|\n|\r|\t|\s*|\0]//g;

the above is commented, but in brackets, "[]", the sword
character (moria anyone ?), "|", is interpreted as a literal
sword, *not* OR.  OR is implied.  Anyway, "tr///" is a better
choice than "s//" here.

>           if ($linkname=~/$filter_name/ ){   # <----- trouble is here
>                   return 1;   # matched
>           }
>     }
> 
>     return 0;   # NOT MATCHED
> }

It looks like you're trying to determine whether or
not a given scalar is present in an array.  Might
I suggest other approaches?

my $matched = grep { $linkname eq $_ } @filter_a;    

# or, better:
my %hash;
@hash{@filter_a} = ();
my $matched = exists $hash{$linkname};

# and, if you want to remove those weird characters
my %hash;
@hash{ map { tr/\B\b\n\r\t \0//d }, @filter_a } = ();
my $matched = exists $hash{$linkname};

	Jay Glascoe


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

Date: Thu, 08 Apr 1999 13:30:23 -0400
From: Erik van Roode <newsposter@cthulhu.demon.nl>
Subject: Re: Installing CPAN modules
Message-Id: <370CE7AD.AB09667A@cthulhu.demon.nl>

Donny Widjaja wrote:
> 
> Erik van Roode wrote:

> > Try specifying the prefix as an absolute path, something like
> >     PREFIX=/home/xxx/user/local
> > or whatever the path to the directory you want to use is

> I tried it, but it still give the same error message.

What module are you trying to install, and on what kind of machine? Perhaps
someone else has a simular configuration and can help.

Another option is debugging the installation:
where do things go wrong? If you can find that location, you might be
able to find out the problem.

Apart from that I can think of no other things to try.

Erik


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

Date: Thu, 08 Apr 1999 10:40:20 PDT
From: kanajan@brown.edu
Subject: matching non-ordered string
Message-Id: <7eipm5$sgb1@fido.engr.sgi.com>

Hi,

I have a regex question. I was trying to match either of the
following:

Entry: stuff,b_r,stuff,b_g,stuff
Entry: stuff,b_g,stuff,b_r,stuff

where stuff could be anything

so I ended up using:

^Entry: (.*(b_r)&.*(b_g))|(.*(b_g)&.*(b_r))

but I feel this is ugly. Is there a nicer way of doing this regex. If
you have any suggestions/advice please let me know via email |
posting.

Thanks,
jaya




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

Date: Thu, 8 Apr 1999 12:02:33 -0500
From: "Mohammad Khan" <support@crosscom.com>
Subject: Perl and Personal Web Server
Message-Id: <7eing8$3r1$1@remarQ.com>

Hi,
    I have written perl programs and i am running personal web server on
windows 98 box. How can i run perl scripts from PWS?

    I know i can run perl scripts from apache windows server, but i want to
run perl scripts from PWS as many of our clients are using PWS. Any help
will be appreciated.

Thanks
Mohammad.




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

Date: 8 Apr 1999 17:58:31 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: perldoc and PAGER
Message-Id: <7eiqo7$471$1@mathserv.mps.ohio-state.edu>

[A complimentary Cc of this posting was sent to David Cassell 
<cassell@mail.cor.epa.gov>],
who wrote in article <370CDB9F.E01699A8@mail.cor.epa.gov>:
> > > Anyone know how to get perldoc -f  and -q to page?
> > 
> > Upgrade.  I think I put this on circa _54.
> > 
> > Ilya
> 
> Good plan.  But I have build 509 on win95, and it still scrolls madly
> for the -q option.  -f now works just fine though.  I haven't bothered
> to fiddle with perldoc.bat yet, like I ought to, since I haven't had a
> need yet...

I do not think 5.005_02 (which is probably 509 - please do not use
this ActiveState nonsense version numbers) have my patches.  On the
other hand, I do not remember patching -q either.  And my patch - of
course - supposes you have *roff.

Ilya


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

Date: Thu, 08 Apr 1999 17:22:03 GMT
From: foj@nym.alias.net
Subject: Privacy for slaves forced to use a proxy/firewall to access the net?
Message-Id: <7eiojh$j6l$1@nnrp1.dejanews.com>



What are the best options for people behind a company/country firewall/proxy
for browsing the web anonymously - for where the actual address the person is
visiting is not revealed in the proxy/firewall logs, and where the data steam
is encrypted from the person's computer to some external proxy?

Will SecureCRT allow an encrypted connection between a person's computer and a
service like Anonymizer, and will it work through a company/country
firewall/proxy?

I've pondered on using Janus to encrypt the address, but that still doesn't
hide the encrypted address from the proxy/firewall. An admin can still browse
to the encrypted addresses I visited and see what I saw, right?

We need a method of browsing for people behind firewalls/forced-proxies which
hides both the content and any address which can allow an admin to bring up
what I brought up.

I've pondered on setting up a server which uses SSL and which pulls whatever
content a user wants back to my server and then sends it to the person
accessing my server. The address at the top of the browser would stay the
same - my server would handle pulling the info the user wants, and pushing it
out to them over the SSL connection. The fact that the address at the top of
the browser wouldn't change would hide what's really going on - since my
server would be the one doing all the work. Maybe there's some sort of Perl
script that would do such a thing - bring content back to a page that will
then be SSL encrypted.

Forcing my server to do all the work is important, because, let's say, if I
had to go to an address like  https://some-secure-anonymous-browsing-
service.com/http://www.sex.com - the Admin would still be able to see that I
went to sex.com. If I use Janus to encrypt the address of www.sex.com, the
admin would still be able to go to
http://janus.ftk.de/janus_encrypted/MTARppWQRxooZte+KulEECU8F31FC0q+9mJc9kQoz
xTR
UacWNTbWb50rUZFXdgetII3QSek7669n0sc9quzYaWuSdUa2SI60EY22bIUU258HOQqmLrok$MnRz
mil mAIStv0= and see the "evil" things I saw.

Anyway, if someone is aware a method of browsing from behind a firewall/proxy
which both encrypts the data and hides any inkling of the final destination,
please let me know.

If you don't like the sex.com example, then how about cnn.com, and etc...

Frank Johnson
foj@nym.alias.net

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Thu, 8 Apr 1999 12:53:23 -0500
From: "Jeff Frost" <jfrost@edstrom.com>
Subject: Re: Privacy for slaves forced to use a proxy/firewall to access the net?
Message-Id: <v26P2.149$Oz.55035@homer.alpha.net>

Here's a radical solution for you...

Use your PeeCee at work for work instead of hunting porn or finding how your
stocks are doing.  Buy a PeeCee at home, get an ISP account and go nutz.
What users like you don't realize is that realaudio broadcast your listening
to, or the real-time stock ticker is clogging down network bandwidth... and
then everyone wonders "why is the network running slow".

Jeff the burned out Admin, CNE

p.s.  If you want advice on how to circumvent security measures, at least
have the courtesy of going to a alt.hacking newsgroup.

foj@nym.alias.net wrote in message <7eiojh$j6l$1@nnrp1.dejanews.com>...
>
>
>What are the best options for people behind a company/country
firewall/proxy
>for browsing the web anonymously - for where the actual address the person
is
>visiting is not revealed in the proxy/firewall logs, and where the data
steam
>is encrypted from the person's computer to some external proxy?
>
>Will SecureCRT allow an encrypted connection between a person's computer
and a
>service like Anonymizer, and will it work through a company/country
>firewall/proxy?
>
>I've pondered on using Janus to encrypt the address, but that still doesn't
>hide the encrypted address from the proxy/firewall. An admin can still
browse
>to the encrypted addresses I visited and see what I saw, right?
>
>We need a method of browsing for people behind firewalls/forced-proxies
which
>hides both the content and any address which can allow an admin to bring up
>what I brought up.
>
>I've pondered on setting up a server which uses SSL and which pulls
whatever
>content a user wants back to my server and then sends it to the person
>accessing my server. The address at the top of the browser would stay the
>same - my server would handle pulling the info the user wants, and pushing
it
>out to them over the SSL connection. The fact that the address at the top
of
>the browser wouldn't change would hide what's really going on - since my
>server would be the one doing all the work. Maybe there's some sort of Perl
>script that would do such a thing - bring content back to a page that will
>then be SSL encrypted.
>
>Forcing my server to do all the work is important, because, let's say, if I
>had to go to an address like  https://some-secure-anonymous-browsing-
>service.com/http://www.sex.com - the Admin would still be able to see that
I
>went to sex.com. If I use Janus to encrypt the address of www.sex.com, the
>admin would still be able to go to
>http://janus.ftk.de/janus_encrypted/MTARppWQRxooZte+KulEECU8F31FC0q+9mJc9kQ
oz
>xTR
>UacWNTbWb50rUZFXdgetII3QSek7669n0sc9quzYaWuSdUa2SI60EY22bIUU258HOQqmLrok$Mn
Rz
>mil mAIStv0= and see the "evil" things I saw.
>
>Anyway, if someone is aware a method of browsing from behind a
firewall/proxy
>which both encrypts the data and hides any inkling of the final
destination,
>please let me know.
>
>If you don't like the sex.com example, then how about cnn.com, and etc...
>
>Frank Johnson
>foj@nym.alias.net
>
>-----------== Posted via Deja News, The Discussion Network ==----------
>http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own




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

Date: Thu, 08 Apr 1999 10:51:35 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: removing the \n at the end of a variable
Message-Id: <370CECA7.87A79D11@mail.cor.epa.gov>

rjshank@postoffice.swbell.net wrote:
> 
> Matthew Bafford wrote:
> 
> > [Followups set, subject adjusted]
> >
> > Wed, 07 Apr 1999 21:29:37 -0500 -- rjshank@postoffice.swbell.net <rjshank@postoffice.swbell.net>:
> > -> J|rgen Exner wrote:
> > -> > David Dineen <cbstramo@iol.ie> wrote in message
> >
> > -> > > I'm not sure about Perl being intuitive. Powerful, useful, omnipotent,
> > -> > > certainly, but intuitive? I wrote a Perl script a while ago to
> > -> > > automate a website (produce HTML from text file with meta data). To
> > -> > > get rid of the newline character from the variable $m I had to do
> > -> > > this:
> > -> > >
> > -> > > $m =~ s/\n$//;
> > -> > >
> > -> > > Obvious, isn't it?
> > -> >
> > -> > What was wrong with "chomp"?
> > [snip]
> > -> chomp?  Could you per chance mean chop?  That won't work for the problem
> > -> he gave.
> >
> > chop  -- trim off the very last character no matter what.
> >          if $m always has an \n on the end, then chop works fine
> > chomp -- trim whatever $/ is set to off of the end of the
> >          variable.  by default this happens to be "\n", so chomp
> >          would also work fine
> >
> > Hope This Helps!
> 
> Interesting, I never heard of it and it's in neither of my Unix Perl programming
> books (the one with the camel on the front and the one with the llama).  Is
> Perl different for Linux or are my books just outdated?
> 
> Rick

Let me guess.  You have the pink llama and camel.  chomp() is new
in version 5.00x and won't be in version 4 books.  Try this command
and see what you get: perldoc -f chomp
If you don't have perldoc, that's but one [small] sign that you need 
to upgrade.

David
-- 
David Cassell, OAO                               
cassell@mail.cor.epa.gov
Senior Computing Specialist                          phone: (541)
754-4468
mathematical statistician                              fax: (541)
754-4716


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

Date: 8 Apr 1999 17:49:59 GMT
From: "Eric Smythe" <ericsm@iafrica.com>
Subject: Re: stumped on regex - someone slay the dragin - please.
Message-Id: <01be81e8$2afd6d40$1c0d1fc4@snow.fruitcom>



Bart Lateur <bart.lateur@skynet.be> wrote in article
<370c8428.13256807@news.skynet.be>...

bart.lateur@skynet.be (Bart Lateur):
> Try something like:
> 
> 	@result = /([\d.\-.]+(?:mm|s)) +([\d.\-]+)/g;
> 
> 	Bart.

Thanx Bart but this does not crack it.

The `(?:mm|s)' does not describe everything that lives inbetween two
prices i.e. the propsed $string. This can be anythign as long as it does
not conform to the rules for matching as a $price.

Let us look more closely at those rules.

   	rule					example
------------------------------------------------------
1. 	a digit					6  
2.	two digits					65
3.	with a .					.65
4.	preceeded by a digit			1.65
5. 	or two digits				23.65

now 1. to 5. describe a $individualPrice

6.	OPTIONALLY followed by a dash and 
6.	another $individualPrice		23.65-1.65

7.	$individualprice has either  ...
a) \b on its left and \b on its right or
b) \b on its left and `-' on its right or
c) `-' on its left and \b on its right

8. 	So it follows that there are never any [A-za-z] that are contiguous
with or embedded in any $individualprice 's.

(fwiw, usually the prices are of a very similiar value)	


So I am still looking to achieve an array with $price's followed by $other
inbetween price stuff, except the $other preceeds the $price so ...

@array = ($otherA, $priceA, $otherB, $priceB ... $otherN, $priceN)

Here is a section of the source file - (see original mail for a longer
source)

Please can someone slay the dragon.

thanx

Eric Smythe


---GRAPEFRUIT: 15 kg cntrs FL U.S. One Star Ruby 36s 12.08-14.27
48s
                                                     ^^^^^^^^^^^
12.08-14.27  56s .27  Ruby Red 48s 11.53  56s .43-.53  SP
^^^^^^^^^^       ^^^                           ^^^^^^
Star Ruby 36s 10.98-12.62  White 48s 10.98-12.62  TU Star Ruby 48s
5.49-8.23
White 48s 5.49-8.23
---LEMONS: 15-16 kg cntrs SP Class I 90s 9.33-10.43  100s 10.15-10.98  120s
10.15-10.98  140s 9.88
---MISC CITRUS: ctns MR Clementine Ortanique 60s 7.41-8.51  75s 8.78-9.33
90s
10.43-11.53  108s 10.43-11.53  SP Clementine 60s 12.08-13.17  80s
12.08-13.17
---APPLES: per kg FR CLASS I Golden Delicious 70-75mm .77-.88  75-80mm
 .88-.99
Granny Smith 75-80mm .77-.93  GM CLASS I Jonagold 70-80mm .52-.60  80-90mm
 .52-.60  Elstar 65-70mm .71-.85  Cox Orange 65-70mm .36-.38  70-80mm
 .77-.82
IT CLASS I Golden Delicious 70-75mm .66-.69  75-80mm .66-.80  Granny Smith
70-80mm .66-.80  Braeburns 70-75mm 1.18-1.29  75-80mm 1.18-1.29  12.5 kg
cntrs
US Pink Lady 64s 18.11-21.96  72s 18.11-21.96  80s 18.11-21.96  18 kg cntrs
FR
CLASS I Golden Delicious 88s 13.17-15.37  100s 13.17-15.37  113s
13.17-15.37
Granny Smith 88s 13.17-14.27  100s 13.17-14.27  113s 13.17-14.27
---APPLES: MARKET ABOUT STEADY. CONTROLLED ATMOSPHERE STORAGE ctns trypk NY
U.S. ExFcy Red Delicious 125s 10.50  Red Rome 80s 15.00  88s 15.00  100s
15.00
 WA WAExFcy Red Delicious 56s 12.50-13.00  64s 13.50  72s 13.50  80s 13.50
88s 13.50  100s 13.00-13.50  113s 13.50  125s 13.50-14.75  Golden Delicious
56s 13.50  64s 15.50  72s 15.50  88s 15.50  100s 15.50  113s 13.00
Granny Smith 64s 16.50-17.50  72s 16.50  80s 16.50-17.50  88s 16.50-18.00
mostly 16.50-17.50 100s 16.50-17.50  125s 16.75  Fuji 48s 24.00  80s 24.00
88s 24.00  100s 20.00  Gala 80s 28.50  88s   one label 33.50 100s 23.00
113s
16.00  U.S. ExFcy Granny Smith 72s 17.00  80s 17.00  88s 17.00  100s 17.50
WAFcy Red Delicious 56s 10.50-11.50  64s 10.50-11.50  72s 10.50-11.50  80s
10.50-11.50  88s 10.50-11.50  113s 11.00-11.50  125s 12.50-13.00
Golden Delicious 64s 11.50  72s 11.50  80s 11.00-12.50  88s 11.50  100s
11.50
113s 11.50  125s 11.50-12.50  ctns 12 3-lb flmbgs NY U.S. ExFcy Red
Delicious
2 1/2" min 10.00  Red Rome 2 1/2" min 11.50  WA WAExFcy Red Delicious
2 1/2" min 14.50-15.00  Golden Delicious 2 1/2" min 14.50-16.50  Gala
2 1/2" up 19.00-19.75  U.S. ExFcy Granny Smith 2 1/2" up 16.00-18.50
mostly 16.00 ctns 8 5-lb flmbgs WA WAExFcy Red Delicious 2 1/2" up
14.50-15.00

---PEACHES: MARKET 26-28 & 40S HIGHER, OTHERS ABOUT STEADY. ctns 1 lyr
trypk CL
Various Yellow Flesh Varieties 26s 18.50  28s 18.50  ctns/lugs 2-lyr trypk
CL
Various Yellow Flesh Varieties 40s 18.50  50s 18.50  60s 16.50
---PEARS: MARKET ABOUT STEADY. CONTROLLED ATMOSPHERE STORAGE 4/5 buctns OR
U.S. One D'Anjou 80s 26.50  Bosc 80s 28.50  ORFcy D'Anjou 90s 18.50-19.00
100s 17.50-18.00  110s 17.50-18.00  120s 17.00-18.00  135s 17.00  Bosc 90s
22.00  100s 21.00  Red D'Anjou 90s 23.00
---PINEAPPLES: MARKET HD 14S HIGHER, HI 5S LOWER, OTHERS ABOUT STEADY.
ctns 1 lyr CR golden ripe 5s 24.00-25.00  6s 25.00  HD 7s 8.25  HI golden
ripe
5s 24.00-25.00   AIR 6s 11.00  7s 12.00-13.00  ctns 2 lyr CR 10s
14.00-15.00
12s 14.00-15.00  occ 11.50 golden ripe 9s 24.00  HD 12s 13.50  occ
11.50 14s 13.00-14.00





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

Date: 8 Apr 1999 17:11:29 GMT
From: Eric Smith <ericsm@shell.iafrica.com>
Subject: Re: stumped on regex
Message-Id: <7eio01$2r0t$1@nnrp01.iafrica.com>

Bart Lateur <bart.lateur@skynet.be> wrote:
> Eric Smythe wrote:

>>I cannot find a regex that will successfully match the prices 
>>in the file below.  To work it needs to create an array that 
>>consists of : @array=($priceA, $stringA, $priceB, $stringB, \
>>$priceC, $stringC ...$stringN)
>>.. where $stringX is the stuff inbetween the two prices.

> Er... may I reverse those? It seems like the "60s" stuff precedes the
> prices.

>>I have marked the prices near the beginning of the sample below 
>>to show what needs to be matched.  Digits followed by `mm' or 
>>an `s' are _not_ prices
>>
>>---GRAPEFRUIT: 15 kg cntrs FL U.S. One Star Ruby 36s 12.08-14.27  48s
>>                                                     ^^^^^^^^^^^
>>12.08-14.27  56s .27  Ruby Red 48s 11.53  56s .43-.53  SP
>>^^^^^^^^^^       ^^^                           ^^^^^^      
>>Star Ruby 36s 10.98-12.62  White 48s 10.98-12.62  TU Star Ruby 48s 5.49-8.23 
>>White 48s 5.49-8.23 
>>---APPLES: per kg FR CLASS I Golden Delicious 70-75mm .77-.88  75-80mm .88-.99 
>>Granny Smith 75-80mm .77-.93  GM CLASS I Jonagold 70-80mm .52-.60  80-90mm

> Try something like:

> 	@result = /([\d.\-.]+(?:mm|s)) +([\d.\-]+)/g;

> 	Bart.


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

Date: 8 Apr 1999 17:54:24 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: Thread renamed to: where to find perl programming tools
Message-Id: <7eiqgg$439$1@mathserv.mps.ohio-state.edu>

[A complimentary Cc of this posting was sent to 
<lvirden@cas.org>],
who wrote in article <7ehouu$6la$1@srv38s4u.cas.org>:
> For the 3 or so people who end up reading this, the cscope mentioned by
> Jin is a Unix tool (that ships with Solaris) that provides a curses interface
> to a ctags like database.  In the database are all the references to all the
> variables, procedures, included files, etc. the user wishes to 'browse'.
> Cscope then allows one to type in a name and will show the user where the
> name appears in the source code tagged.  The user then gets a chance to
> 'scroll' through the references and have cscope drop you into an editor
> to see the line in context.  The user can do 'replace this name with a
> second name' and selectively apply the replace.  The user can search for
> 'strings' as well (for cases where one wants to change comments, or just
> see where a word is documented, used in quotes, etc.).
> 
> cscope is NOT an IDE in the sense that normally sends unix perl programmers
> into spasms.  Instead, think of it as a source code browser.
> 
> In theory, a perl script could generate a file in the format expected by
> cscope and cscope could then be used to browse...

What doing 

     make ctags

in the Perl build directory gives you wrt cscope (the versions I have
now - _03 and _53 - have only etags support, but I vaguely remember
ctags support being added lately).

Ilya


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

Date: Thu, 08 Apr 1999 17:39:04 GMT
From: cdtoad@hotmail.com
Subject: Re: using perl CGI to automatically post data to an HTML form
Message-Id: <7eipjl$kon$1@nnrp1.dejanews.com>

Also check into using sockets to connect push data to where every you want.

In article <37083238.0@usenet.fccj.cc.fl.us>,
  "Bill Jones" <bill@fccj.org> wrote:
> In article <3705f69f.4861893@news.msen.com>, sweet@enterpriseusa.com (Rob
> Sweet) wrote:
>
> > I need to have a Perl CGI script "automatically" fill out an HTML form
> > and "click" submit.  It seems like this shouldn't be that hard, but
> > I've looked through CGI.pm and libnet.pm and haven't come up with
> > anything.
> >
> > Oh, one more thing... There are specific reasons why I can't simply
> > bypass the form and call the CGI that it calls, I've already examined
> > that route.
>
> This isn't a CGI problem, CGI's are *usually* executed
> by a browser action, so you should really look at LWP again.
>
> The answer is in there; or you could just custom write a
> browser in perl yourself.  Pretty straight forward,
> there are some code examples on CPAN.
>
> (BTW:  The rest of the group should note that I did say usually.)
>
> Also, I am curious:  How does your 'client' know what to
> say (or fill-in if you prefer) on this remote HTML form?
>
> HTH,
> -Sneex-  :]
> ________________________________________________________________________
> Bill Jones  |  FCCJ Webmaster  |  http://www.fccj.org/cgi/mail?webmaster
> FCCJ  |  501 W State St  |  Jacksonville, FL 32202  |  1 (904) 632-3089
>
>          Jacksonville Perl Mongers
>          http://jacksonville.pm.org
>          jax@jacksonville.pm.org
>

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Thu, 8 Apr 1999 10:11:52 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Validating Email addresses
Message-Id: <MPG.11768330a6545e1f98986c@nntp.hpl.hp.com>

In article <923588160.662415@nurn.esoterica.pt> on Thu, 8 Apr 1999 
17:16:28 +0100, Edson Medina <edson@usa.net >says...
> > if ($ToEmail=~/\@/)
> 
> maybe if you use /@/ instead of /\@/

And then again, maybe not.

Those two regexes are identical.

Did you try even a simple test before posting?

-- 
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>


Administrivia:

Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing. 

]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body.  Majordomo will then send you instructions on how to confirm your
]subscription.  This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.

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.  

To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.

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.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

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 V8 Issue 5331
**************************************

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