[11879] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5479 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Apr 25 14:07:30 1999

Date: Sun, 25 Apr 99 11:00:20 -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           Sun, 25 Apr 1999     Volume: 8 Number: 5479

Today's topics:
        $. woes <jerryp.usenet@connected.demon.co.uk>
    Re: $. woes (Larry Rosler)
    Re: $ENV...Explained (Tad McClellan)
        ANNOUNCE: CGI-Debug-0.03 <jonasl@xms.se>
    Re: Can a DNS lookup be performed from within perl ? (Benjamin Franz)
        Check to see if a Module Exists... <wells@cedarnet.org>
    Re: FAQ 7.13: What is variable suicide and how can I pr <tchrist@mox.perl.com>
    Re: FAQ 7.13: What is variable suicide and how can I pr (Larry Rosler)
    Re: FAQ 7.13: What is variable suicide and how can I pr (Larry Rosler)
        glob failed, make test 5.005_03 glibc-2.1 <mack@ncifcrf.gov>
    Re: Help me with a simple cgi/perl script <ffchopin@worldnet.att.net>
        Help with CTlib and DBlib! (UNKOWN)
    Re: How do we create global variables in perl? <ffchopin@worldnet.att.net>
    Re: How to make an array name to be a variable? (Tad McClellan)
        IIS, ASP, Perl problem. <shao_ming.fung@virgin.net>
    Re: IIS, ASP, Perl problem. <ffchopin@worldnet.att.net>
        match a header <bart@moeha.net>
    Re: match a header (Larry Rosler)
    Re: Net FTP? in ascii or binary (I R A Aggie)
    Re: Net::FTP creates Empty file (I R A Aggie)
    Re: Net::FTP creates Empty file <tripix@tdi-net.freeserve.co.uk>
    Re: Newbie regex query (Tad McClellan)
    Re: PERL Books (Larry Rosler)
    Re: PERL Books (Tad McClellan)
        Perl, IIS, ASP problem <shao_ming.fung@virgin.net>
    Re: Running CGI scripts OFFLINE <jeff@vpservices.com>
        send mail function <dobiho@bigfoot.com>
    Re: send mail function <bill@fccj.org>
    Re: TCP/IP beginner <tchrist@mox.perl.com>
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: Sun, 25 Apr 1999 17:31:16 +0100
From: Jerry Pank <jerryp.usenet@connected.demon.co.uk>
Subject: $. woes
Message-Id: <Pi1o8BAUN0I3EwGZ@connected.demon.co.uk>

I had hoped this snippet would pick records 1,7 & 12 from my \n
separated text file.
 

   @rec_nos = qw( 1 7 12 );     

   open ( DB, "<$db_file" ) or die "$!Cant open db $db_file";   

   foreach $. (@rec_nos) {
      $record = <DB>;
      &do_stuff($record);                          
      seek DB,0,0;
   }

My understanding was that $. is the line number of the last opened/read
filehandle which is <DB> in this case. Isn't it ?

Enlightenment please.
-- Jerry Pank                             http://www.netconnected.com/
                                        jerryp.usenet@netconnected.com

So far we've managed to avoid turning Perl into APL.  :-)
-- Larry Wall in <199702251904.LAA28261@wall.org>



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

Date: Sun, 25 Apr 1999 10:17:21 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: $. woes
Message-Id: <MPG.118cedfaa517394698993c@nntp.hpl.hp.com>

[Posted and a courtesy copy sent.]

In article <Pi1o8BAUN0I3EwGZ@connected.demon.co.uk> on Sun, 25 Apr 1999 
17:31:16 +0100, Jerry Pank <jerryp.usenet@connected.demon.co.uk> says...
> I had hoped this snippet would pick records 1,7 & 12 from my \n
> separated text file.
>  
>    @rec_nos = qw( 1 7 12 );     
> 
>    open ( DB, "<$db_file" ) or die "$!Cant open db $db_file";   
> 
>    foreach $. (@rec_nos) {
>       $record = <DB>;
>       &do_stuff($record);                          
>       seek DB,0,0;
>    }
> 
> My understanding was that $. is the line number of the last opened/read
> filehandle which is <DB> in this case. Isn't it ?

It is.  The I/O system sets it for you.  You can't set it.

You had better read the file sequentially and process each record, 
rather than trying to seek to each record.  The following is scalable to 
large databases and many records to process.  I chose to write it as 
essentially a one-liner; UNTESTED but ...:

     @rec_nos = qw( 1 7 12 );     

     my %rec_nos;
     @rec_nos{@rec_nos} = ();     
  
     open DB, $db_file or die "Can't open db $db_file. $!\n";   
  
     exists $rec_nos{$.} and do_stuff($_) while <DB>;                          

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


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

Date: Sun, 25 Apr 1999 08:17:39 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: $ENV...Explained
Message-Id: <351vf7.ja1.ln@magna.metronet.com>

HowToFoldSoup (webmaster@eat.me.howtofoldsoup.com) wrote:
: I believe the people who answered the question weren't understanding the
: question.

: What the questioner, as I understand it, was trying to ask was if there is a
: list of the $ENV{'VAR_TYPE'} type of variables that a browser automatically
: passes to the perl script.


   If that is so, then they asked in the wrong place, since
   what they are set to is not up to Perl.

   It is up to some sort of WWW protocol or interface or something,
   and so it should have been asked in a WWW newsgroup.
   

--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: Sun, 25 Apr 1999 20:52:02 +0200
From: Jonas Liljegren <jonasl@xms.se>
Subject: ANNOUNCE: CGI-Debug-0.03
Message-Id: <37236452.BF5B2C1A@xms.se>

CGI::Debug  v0.03 alpha   -   module for debugging CGI programs.

NOT on CPAN. Get it here: 
        http://paranormal.o.se/perl/dist/CGI-Debug-0_03.tar.gz

Would you find this module useful?  Please mail me.



It's goal is to catch ALL errors and display them, along with useful
data like form data, cookies, etc. You should never see the "Internal
Server Error" message.

The module will not change the behaviour of your cgi program.  As long
as your program works, you will not notice the modules presence. The
only ting you will have to do is "use CGI::Debug". Then your program
works, you can just remove the line.

It's highly configurable. Choose what functions to use.

 Report
 o  warnings
 o  runtime errors
 o  compilation errors
 o  faulty HTTP headers
 o  Form data
 o  Cookies
 o  Enviroment
 o  Elapsed time in subseconds

 Report
 o  to Browser
 o  to error log
 o  to file
 o  as mail to owner and/or others

 Report
 o  if warnings occured
 o  if program died
 o  always


Configure with cookies, or enviroment variables, or on the use
line.  This makes it possible 


EXAMPLES

Only report errors:
    use CGI::Debug( report => 'errors' );

Do not bother about warnings:
    use CGI::Debug( on => 'fatals' );

Allways show complete debugging info:
    use CGI::Debug( report => 'everything', on => 'anything' );

Send debug data as mail to file owner:
    use CGI::Debug( to => 'mail' );


REQUIRES

 o  CGI
 o  perl 5.004


TODO

 o Clean up and generalize configuration

 o Test it on non *nix platforms

 o Make it work with mod_perl

 o Implement HTML_compliance controls (using HTML::validate)

 o Implement function for debugging in a separate window

 o Enable custom responses for visitors on program failure


AUTHOR

  Jonas Liljegren <jonas@paranormal.o.se>


-- 
Jonas Liljegren      mailto:jonasl@xms.se


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

Date: Sun, 25 Apr 1999 15:07:35 GMT
From: snowhare@long-lake.nihongo.org (Benjamin Franz)
Subject: Re: Can a DNS lookup be performed from within perl ?
Message-Id: <XcGU2.2917$oU1.210288@typhoon-sf.snfc21.pbi.net>

In article <MPG.118ac438437cee1698992e@nntp.hpl.hp.com>,
Larry Rosler <lr@hpl.hp.com> wrote:
>[Posted and a courtesy copy sent.]
>
>In article <37210887.24C61A7A@ececs.uc.edu> on Fri, 23 Apr 1999 19:55:51 
>-0400, Rajesh Radhakrishnan <rradhakr@ececs.uc.edu> says...
>...
>>   # search for IP address eg.129.137.4.62 in log file
>>   if (m/(\d+.\d+.\d+.\d+)/) {
>
>I'll just point out that this regex will also find, for example, 
>'1234567' or lots of other strings that aren't dotted-quads.  I'll let 
>the others whine about IP addresses that have only two or three dots.

Surprisingly enough, '1234567' could (almost) be an IP address.

Try http://3521755779/snowhare/ in a web browser (note -
the Squid proxy server _mistakenly_ rejects straight 32 bit
addresses as being invalid).

Benjamin Franz


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

Date: Sun, 25 Apr 1999 16:03:48 +0000
From: Steve Wells <wells@cedarnet.org>
Subject: Check to see if a Module Exists...
Message-Id: <37233CE4.6A47B77F@cedarnet.org>

I'm writing an install script and need to know if a module
exists, if it doesn't I'd like to allow the user to install
it with CPAN.pm.  I'm looking for something like:

use MOD or &install_MOD;

I realize there are several ways to do this and the first
thing that comes to mind is wrapping it in an eval statement
but I was wondering if there are any cool hacks for doing 
this as I'm sure others have run into before themselves.

TIA,
STEVE

------------
Stephen D. Wells
http://expert.cc.purdue.edu/~bgannon/booksearch/
http://www.iren.net/wellss/


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

Date: 25 Apr 1999 09:07:28 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: FAQ 7.13: What is variable suicide and how can I prevent it?
Message-Id: <37232fb0@cs.colorado.edu>

 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.misc, 
    lr@hpl.hp.com (Larry Rosler) writes:
:Putting these things in front of use periodically is a Good Thing!

What does "in front of use" mean? 

--tom
-- 
"Memory is the cabinet of imagination, the treasury of reason, the registry of
 conscience, and the council chamber of thought."
				- St. Basil


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

Date: Sun, 25 Apr 1999 08:07:57 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: FAQ 7.13: What is variable suicide and how can I prevent it?
Message-Id: <MPG.118ccfa0f927f505989939@nntp.hpl.hp.com>

[Posted and a courtesy copy sent.]

In article <37230a24@cs.colorado.edu> on 25 Apr 1999 06:27:16 -0700, Tom 
Christiansen <perlfaq-suggestions@perl.com> says...
 ... 
>         my $f = "foo";
>         sub T {
>           while ($i++ < 3) { my $f = $f; $f .= "bar"; print $f, "\n" }
>         }
>         T;
>         print "Finally $f\n";
> 
>     The $f that has "bar" added to it three times should be a new `$f'
>     (`my $f' should create a new local variable each time through the
>     loop). It isn't, however. This is a bug, and will be fixed.

On 5.004_03 and 5.005_03 it works properly.  The FAQ should be fixed.

Putting these things in front of us periodically is a Good Thing!
  
-- 
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: Sun, 25 Apr 1999 08:26:16 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: FAQ 7.13: What is variable suicide and how can I prevent it?
Message-Id: <MPG.118cd3ecf54982b898993a@nntp.hpl.hp.com>

[Posted and a courtesy copy sent.]

In article <37232fb0@cs.colorado.edu> on 25 Apr 1999 09:07:28 -0700, Tom 
Christiansen <tchrist@mox.perl.com> says...
>  [courtesy cc of this posting sent to cited author via email]
> 
> In comp.lang.perl.misc, 
>     lr@hpl.hp.com (Larry Rosler) writes:
> :Putting these things in front of use periodically is a Good Thing!
> 
> What does "in front of use" mean? 

It means 'us', dammit, and it also means I shouldn't post on Sunday 
morning before finishing the Times crosswords.

I've corrected the original post.

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


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

Date: Sun, 25 Apr 1999 16:30:46 +0000
From: mack <mack@ncifcrf.gov>
To: mack@ncifcrf.gov
Subject: glob failed, make test 5.005_03 glibc-2.1
Message-Id: <37234336.1F0F0128@ncifcrf.gov>

I've tried making 5.005_03 (both static and dynamic)
on linux-2.2.6/glibc-2.1 (I answer "n" to the
use vfork() option and build nonthreaded).
After a successful build I get 4 errors of

glob failed (child exited with status 139)

Going back one version to 5.005_02 (built as 
static) gets 4 errors like

internal error: glob failed at op/glob.t line 7

the same 5.005_03 build goes fine on a 
linux-2.0.36/libc5 machine

any suggestions?
thanks Joe
-- 
Joseph Mack, NA3T, FM05lw EME(B,D) 
AZ_PROJ map server at http://www.wm7d.net/azproj.shtml
mailto:mack@ncifcrf.gov


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

Date: Sat, 24 Apr 1999 12:38:04 -0400
From: "Jason Simms" <ffchopin@worldnet.att.net>
Subject: Re: Help me with a simple cgi/perl script
Message-Id: <7fvg8p$of8$1@bgtnsc03.worldnet.att.net>

[courtesy copy sent via email]

SatCP <satcp@ping.be> wrote in message
news:7fv8qc$dgs$3@news3.Belgium.EU.net...
> Hi everybody,
>
> I'm new to cgi, but want a script on my webpage. I've looked around on the
> web but couldn't find a script that does everything I want... I know most
of
> you will say, go out and buy a good book 'bout cgi and perl, but I only
need
> 1 simple script on my page and I'm not buying a book for that...

"Give a man a fish and he will eat for a day.  Teach a man to fish and he
will eat for a lifetime."  Cheesy but true, to a point.  What happens if you
later want to extend the functionality of the script?  What if you need
support on it?  Or, god forbid, what if, just if, one day, you DO need
another script?  If you purchase the Official Guide to Programming with
CGI.pm, it can teach you all you will reasonably need for your needs, and
CGI.pm comes with the standard Perl distribution.  I grow weary of people
asking us for free scripts.  We will provide peer support, even if it is (in
my opinion) sometimes a little harsh, but we are NOT about free coding - it
goes against most of what we believe in in this community.

> SNIP program description <

> How to do this in a CGI script?
> Please help me finnishing this simple script so I can make my webpage
> interactive...

What you want will take no time at all.  With a copy of Learning Perl and
the above mentioned book, you will probably be able to do it in a weekend or
so.  You will find that other will agree with me, so kicking and screaming
will not help.  If you still refuse to do it yourself, hire a good
freelancer, but please don't expect this for free in any case.

Jason Simms





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

Date: 25 Apr 1999 15:28:34 GMT
From: quoc@wam.umd.edu (UNKOWN)
Subject: Help with CTlib and DBlib!
Message-Id: <7fvcb2$7f7$1@dailyplanet.wam.umd.edu>

I having trouble find a man page to DBlib and CTlib!
Can someone tell me where or how I can find one and
give me samples of how to use it..
thanks


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

Date: Sat, 24 Apr 1999 12:55:15 -0400
From: "Jason Simms" <ffchopin@worldnet.att.net>
Subject: Re: How do we create global variables in perl?
Message-Id: <7fvh90$82k$1@bgtnsc03.worldnet.att.net>


Ted Unnikumaran <unni@wam.umd.edu> wrote in message
news:3722B025.7AC5002E@wam.umd.edu...
> Hello, i'm just beginning to learn perl, so I apologize if this is a
> stupid question.
>
> I want to know how I can use global variables in perl.  I've heard that
> environmental variables are basically global variables, but that doesn't
> seem to work properly for me.
>
> This is basically what i want to do.
>
> When someone enters my web page, i want them to enter a user id and
> other information about themselves.  They then press the submit button
> and that information gets passed to some .cgi file, say 1st.cgi.  This
> 1st.cgi file will then create another web page, where the user will
> enter even more information about themselves, and press another submit
> button.  This second submit button wil call another .cgi file, lets call
> it 2nd.cgi and its at this page that I am having problems.  How can I
> access the information entered into the first web page and passed into
> 1st.cgi from this 2nd.cgi file?

Also, read the Official Guide to Programming with CGI.pm, which will
demonstrate ways that it is handled.  You can more than likely get away with
actually using only ONE file to handle all your CGI needs, which sure beats
managing several files at once.

Jason Simms




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

Date: Sun, 25 Apr 1999 07:59:06 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: How to make an array name to be a variable?
Message-Id: <a20vf7.ja1.ln@magna.metronet.com>

Tad McClellan (tadmc@metronet.com) wrote:

:          print "sometimes he kisses her $wife{$_}\n";


   Uhh. Make that:

           print "sometimes he kisses her $_\n";


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: Sun, 25 Apr 1999 16:55:24 +0100
From: ming <shao_ming.fung@virgin.net>
Subject: IIS, ASP, Perl problem.
Message-Id: <37233AEC.1D161137@virgin.net>

I currently trying install a Perl/CGI Web Based Application I've
developed, however I'm experiencing
problems going from the test box to the live. The platform is Windows NT

using ISS ( internet information server ).

When the initial perl file is accessed via the internet browser, instead

of the perl.exe executing the file the
Open/Save requester is displayed. Once either 'Open' or 'Save' is
selected, I get an error message
'Can't find file ..... in C:\winnt\temporary internet area' .

Since there is a ASP based web application already installed on this
box, are there compatibility/environment  issues involving Perl,ASP,IIS
 .

It's also likely I've missed an important setup step, however the
registry seems to be set-up correctly.





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

Date: Sat, 24 Apr 1999 12:27:39 -0400
From: "Jason Simms" <ffchopin@worldnet.att.net>
Subject: Re: IIS, ASP, Perl problem.
Message-Id: <7fvfla$gmf$1@bgtnsc03.worldnet.att.net>

[courtesy copy sent via email]

ming <shao_ming.fung@virgin.net> wrote in message
news:37233AEC.1D161137@virgin.net...
> I currently trying install a Perl/CGI Web Based Application I've
> developed, however I'm experiencing
> problems going from the test box to the live. The platform is Windows NT
>
> using ISS ( internet information server ).
>
> When the initial perl file is accessed via the internet browser, instead
>
> of the perl.exe executing the file the
> Open/Save requester is displayed. Once either 'Open' or 'Save' is
> selected, I get an error message
> 'Can't find file ..... in C:\winnt\temporary internet area' .
>
> Since there is a ASP based web application already installed on this
> box, are there compatibility/environment  issues involving Perl,ASP,IIS
> .
>
> It's also likely I've missed an important setup step, however the
> registry seems to be set-up correctly.

You have a server configuration issue.  IIS does not understand that you
want the script to be executed, so since it doesn't understand the fil
extension, it prompts for download.  Thus, this is not a Perl issue, so it
is best taken to the server newgroup instead.  But, I can tell you that when
installing ActiveState Perl (which I assume you have), it does ask if you
want it to handle the web server configuration for you.  Also, there is
plenty of documentation out there for IIS and CGI - look in the included
docs, as well as TechNet.  As to the conflict with ASP, there isn't one,
really.  In fact, with Perl installed and the Microsoft Scripting Engine,
you can actually use PerlScript for you ASP needs instead of VBScript or
ECMAScript, and it's faster than all of them, based on recent benchmarks
done by others in this group.

Jason Simms




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

Date: Sun, 25 Apr 1999 17:35:59 +0200
From: bart <bart@moeha.net>
Subject: match a header
Message-Id: <Pine.LNX.4.03.9904251731230.32259-100000@backslash.moeha.net>

Hi, 

I wrote a little perl-script which fetches the newest message from a
POP-account. Now I'm looking for a way to show only the From-header. 
This is what I tried: 

my @message = $pop->get($new_message)
$from = grep (!/From/, @message);
print $from, "\n";

This returns the value 1. Probably because there is one time the
From-header. Is there a way to make the script show the entire From-header
instead of 1 ?

Thanks in advance, 

(if you can help me, could you please also reply by e-mail)

bart
--
admin@turboline.net - http://www.moeha.net - bart@moeha.net
grep... grep... grep... (a frog with unix stuck in its throat) 



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

Date: Sun, 25 Apr 1999 09:26:33 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: match a header
Message-Id: <MPG.118ce20efb2bfb8f98993b@nntp.hpl.hp.com>

[Posted and a courtesy copy sent.]

In article <Pine.LNX.4.03.9904251731230.32259-
100000@backslash.moeha.net> on Sun, 25 Apr 1999 17:35:59 +0200, bart 
<bart@moeha.net> says...
> I wrote a little perl-script which fetches the newest message from a
> POP-account. Now I'm looking for a way to show only the From-header. 
> This is what I tried: 
> 
> my @message = $pop->get($new_message)
> $from = grep (!/From/, @message);
> print $from, "\n";
> 
> This returns the value 1. Probably because there is one time the
> From-header. Is there a way to make the script show the entire From-header
> instead of 1 ?

I would say because there is one time *not* the From-header.

my ($from) = grep /^From/, @message;

The parentheses give it list context.

> Thanks in advance, 

You're welcome, after the fact.
 
> (if you can help me, could you please also reply by e-mail)

No problem.

> bart
> --
> admin@turboline.net - http://www.moeha.net - bart@moeha.net
> grep... grep... grep... (a frog with unix stuck in its throat) 

perldoc -f grep... grep... grep...

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


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

Date: 25 Apr 1999 15:38:19 GMT
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: Net FTP? in ascii or binary
Message-Id: <slrn7i6ds8.l7m.fl_aggie@stat.fsu.edu>

On Sun, 25 Apr 1999 18:48:57 +0930, Dave Johnson
<gxd@bigpond.com>, in <CfAU2.2343$116.3002@news2.ozemail.com.au> wrote:

+ I noticed some problems with the files that needed to be transferred by
+ binary and was wondering how the transer is done, and what command do I need
+ to define the way it should be transferred if I want it to be transferred
+ via Binary?

% perldoc Net::FTP

Look for:

     ascii ([ARGS]) binary([ARGS]) ebcdic([ARGS]) byte([ARGS])

James


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

Date: 25 Apr 1999 15:37:01 GMT
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: Net::FTP creates Empty file
Message-Id: <slrn7i6dpq.l7m.fl_aggie@stat.fsu.edu>

On Sun, 25 Apr 1999 12:25:47 +0100, Wayne Keenan
<tripix@tdi-net.freeserve.co.uk>, in <7fuukg$e4c$1@news6.svr.pol.co.uk> wrote:

+ As one can see there is no filesize on line <<150 ASCII connection,

No, it's FTP, which for the most part doesn't provide size ahead of time.

+ nor is there a command successful message.

Sure there is, 2xx messages are sucess messages, and you got a 226.

+ But there is a file of the right name and size 0!

Ok, now _that_ is problematic. You obviously have write permissions,
or you wouldn't have the file even at 0 size. Strikes me as a server
problem of some sort. Here are the essentials from a test I ran
against my machine (solaris 2.5):

Net::FTP=GLOB(0x1f6f8c)>>> STOR results_test
Net::FTP=GLOB(0x1f6f8c)<<< 150 ASCII data connection for results_test \
 (128.186.4.10,33458).
Net::FTP=GLOB(0x1f6f8c)<<< 226 Transfer complete.

Which are remarkably similar to your own. Try running this against a
different ftp server, if you can. Or take a look at the server logs,
if any.

James


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

Date: Sun, 25 Apr 1999 18:40:24 +0100
From: "Wayne Keenan" <tripix@tdi-net.freeserve.co.uk>
Subject: Re: Net::FTP creates Empty file
Message-Id: <7fvkfb$vss$1@news6.svr.pol.co.uk>


I R A Aggie wrote in message ...
>On Sun, 25 Apr 1999 12:25:47 +0100, Wayne Keenan
><tripix@tdi-net.freeserve.co.uk>, in <7fuukg$e4c$1@news6.svr.pol.co.uk> wrote:
>
>Net::FTP=GLOB(0x1f6f8c)>>> STOR results_test
>Net::FTP=GLOB(0x1f6f8c)<<< 150 ASCII data connection for results_test \
> (128.186.4.10,33458).
>Net::FTP=GLOB(0x1f6f8c)<<< 226 Transfer complete.
>
>Which are remarkably similar to your own. Try running this against a
>different ftp server, if you can. Or take a look at the server logs,


After contacting  a different machine (the previous was a solaris 5.6 box) this time it is a linux
5.1 box (kernel 2.0.36) running ProFTPD 1.2.0pre3 Server (ProFTPD)  we have this:

Net::FTP=GLOB(0xbeaddc)<<< 200 PORT command successful.
Net::FTP=GLOB(0xbeaddc)>>> STOR temp.html

Net::FTP=GLOB(0xbeaddc)<<< 150 Opening ASCII mode data connection for temp.html.
Net::FTP=GLOB(0xbeaddc)<<< 226 Transfer complete.

Yet again, correct filename, zero file size.

I have done some testing before using 2 different ISPs  (freeserve.net and Southampton University)
I cannot tell what FTP server Freeserve is using, listed above is a FTP server at Soton univ.

Arrrg Im going sightly mad!

Thanks for your time

Wayne






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

Date: Sun, 25 Apr 1999 08:11:30 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Newbie regex query
Message-Id: <ip0vf7.ja1.ln@magna.metronet.com>

Larry Rosler (lr@hpl.hp.com) wrote:
: In article <moqsf7.mk.ln@magna.metronet.com> on Sat, 24 Apr 1999 
: 12:16:22 -0400, Tad McClellan <tadmc@metronet.com> says...
: > Thomas A. Bryan (tbryan@arlut.utexas.edu) wrote:
: > : Andy Elvey wrote:

: > : I would have written this as 7x^3 and 21x^2.
: > 
: >    A Perl programmer would have used Perl's notation for exponentiation:
: > 
: >       7x**3 and 21x**2

: and for multiplication:

:         7*x**3 and 21*x**2

: and might even throw in a couple of spaces (using the generous 
: definition of 'a couple' that we have learned here recently).


   Golly.

   Now we have to throw in a funny punctuation character for
   the variable too:

          7*$x**3 and 21*$x**2



   By now I've forgotten, were we trying to make it better or worse?

   
--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: Sun, 25 Apr 1999 08:03:30 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: PERL Books
Message-Id: <MPG.118cce95b6f56a73989937@nntp.hpl.hp.com>

[Posted and a courtesy copy sent.]

In article <37231d04@cs.colorado.edu> on 25 Apr 1999 07:47:48 -0700, Tom 
Christiansen <tchrist@mox.perl.com> says...
 ...
>          Later, dmr tried to get the spelling changed to `Unix'
>     in a couple of Bell Labs papers, on the grounds that the word
>     is not acronymic. He failed, and eventually (his words) "wimped
>     out" on the issue. So, while the trademark today is `UNIX', both
>     capitalizations are grounded in ancient usage; the Jargon File uses
>     `Unix' in deference to dmr's wishes.
> 
> So, spelling it "UNIX" is a mistake, in that 1) it is not an acronym
> and 2) is not what dmr wishes used.

Thanks for the quote, which is nostalgic for me.

Lawyers take trademark protection very seriously.  Bell Labs and its 
various owners *require(d?)* of its employees that it always be used 
this way:

   ... The UNIX* System ...

* UNIX is a registered trademark of [fill in the blank] Bell 
Laboratories in the United States and other countries.

That's supposed to be a TM after the UNIX, if your software can hack it.

The trademark has since been sold several times, including to X/Open 
(now The Open Group, I think).  I'm not sure who has the baton now.

All of which is why I now always write it as Unix.  :-)

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


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

Date: Sun, 25 Apr 1999 08:06:44 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: PERL Books
Message-Id: <kg0vf7.ja1.ln@magna.metronet.com>

Zekers (zzekka@intrex.net) wrote:
: Jonathan Stowe wrote:

: > On Fri, 23 Apr 1999 22:14:39 -0400 E. Preble wrote:
: > > What are the best books out there for all levels of PERL writers?
: > >
: >
: > A spot of token pedantry - it is Perl when you are talking about the
: > language and perl when you are talking about the actual executable.
: > As with most things with their origins in the Unix world it is case
: > sensitive (and yes I am assiduously avoiding mentioning anything to
: > do with acronyms :)
: >

: To be just a bit persnickety - it's UNIX not Unix. By why make a case out of it
: ;-?


   No reason to make a case out of that one because UNIX/Unix
   will be taken to mean the same thing by most folks, and
   there will be no confusion.

   Perl/perl will be taken to mean different things though.

   Which is the whole point. 

   There _is_ a difference between the two in a Perl (or perl) 
   context. 

   Most folks are used to ignoring the different spelling, and
   so should be alerted that here is an exception to what they
   are used to.


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: Sun, 25 Apr 1999 16:54:50 +0100
From: ming <shao_ming.fung@virgin.net>
Subject: Perl, IIS, ASP problem
Message-Id: <37233ACA.2AE24927@virgin.net>





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

Date: Sun, 25 Apr 1999 09:59:47 -0700
From: Jeff Zucker <jeff@vpservices.com>
To: Troy Knight <tk@toilets.freeserve.co.uk>
Subject: Re: Running CGI scripts OFFLINE
Message-Id: <37234A03.3A72EA76@vpservices.com>

Troy Knight wrote:
> 
> wait a miuntem are you lot talking about running perl scripts OFFLINE? on
> your computer?  How cool is that, not having to pay hundreds of $/# to test
> out the scripts.  I dont suppose I could do it on my win 98 machine could
> I???

1. get activePerl from www.activestate.com (free)

2. get apache or xitami web server from www.apache.org or www.xitami.com
or omnihttpd or tinyweb or some other (free) web server for windoze

3. run and test your cgi scripts offline

No $/# involved anywhere in the chain except the ones you paid to Bill
for windoze in the first place.

-- 
jeff


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

Date: Tue, 20 Apr 1999 20:02:19 +0900
From: Youngwan Choi <dobiho@bigfoot.com>
Subject: send mail function
Message-Id: <371C5EBB.BD436CCD@bigfoot.com>

#!/usr/local/bin/perl -U


&send_mail("test","dobiho\@bigfoot.com","dobiho\@bigfoot.com","content");


sub send_mail {

 local($subject,$recipient,$sender,$content)=@_; # sendmailGA7N1W7%@G
0f7N8& @{>nAX4Y

        open(MAIL, "|$send_mail_prog -t") || die "Can't open sendmail";
        print MAIL "To: $recipeint\n";
        print MAIL "From: $sender\n";
        print MAIL "Subject: $subject\n\n";
        print MAIL "$content\n";

        close(MAIL);
}


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

Date: Sun, 25 Apr 1999 13:07:56 -0400
From: "Bill Jones" <bill@fccj.org>
Subject: Re: send mail function
Message-Id: <37234bde.0@usenet.fccj.cc.fl.us>

In article <371C5EBB.BD436CCD@bigfoot.com>, Youngwan Choi 
<dobiho@bigfoot.com> wrote:


> #!/usr/local/bin/perl -U
>
>
> &send_mail("test","dobiho\@bigfoot.com","dobiho\@bigfoot.com","content");
>
>
> sub send_mail {
<snipped code>
> }


No, please

use Mail;

Mail.pm can be found on CPAN.
They are many better methods,
please don't reinvent the wheel.

HTH,
-Sneex-  :]
______________________________________________________________________
Bill Jones  Data Security Specialist  http://www.fccj.org/cgi/mail?dss

         Jacksonville Perl Mongers
         http://jacksonville.pm.org
         jax@jacksonville.pm.org

         Running LinuxPPC RedHat 5.0 (Hurricane)
       __ _                     http://www.linuxppc.org
      / /(_)_ __  _   ___  __   http://www.apache.org
     / / | | '_ \| | | \ \/ /   http://www.redhat.com
    / /__| | | | | |_| |>  <    http://www.perl.com
    \____/_|_| |_|\__,_/_/\_\   http://www.gimp.org


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

Date: 25 Apr 1999 09:52:29 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: TCP/IP beginner
Message-Id: <37233a3d@cs.colorado.edu>

 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.misc, William Brogden <wbrogden@bga.com> writes:
:I too am trying to get Perl to communicate with sockets. When I read the
:supplied documentation I keep running into descriptions of various flags
:and <BRAIN-DAMAGED WORD WRAP HERE>
:constants - nowhere do I find what these constants mean, what the
:alternatives <BRAIN-DAMAGED WORD WRAP HERE>
:are, what the defaults are, etc. - Could some kind soul direct me to
:REAL <BRAIN-DAMAGED WORD WRAP HERE>
:documentation....

0) The networking code in your kernel, of course.  See the C include
   files with all the constants, too.

1) The source code to any of the normal networking utilities
   or their adminish servers.  In no particular order, I suggest checking
   out things like finger, sendmail, named, pop3, syslogd, the portmapper,
   comsat, telnet, rlogin, talk, ping, inn, timed, httpd, identd and all
   the rest.  They have manpages.  They have source code.  Reading them
   is good for you.

2) Standard Manpages:	
	accept(2), bind(2), connect(2), socket(2), getprotoent(3),
	getsockname(2), getsockopt(2), ioctl(2), listen(2), read(2),
	recv(2), poll(2), select(2), send(2), shutdown(2), socketpair(2),
	write(2), netintro(4)

3) Perl Manpages:
	perlfunc(1)
	perlipc(1)
	perlfaq9(1)
	Socket(3)
	IO::Socket(3)

4) CPAN module directories on
	http://www.perl.com/CPAN-local/modules/by-category/
   where you will find these subdirectories of interest
	05_Networking_Devices_IPC/          
	15_World_Wide_Web_HTML_HTTP_CGI/
	16_Server_and_Daemon_Utilities/
	19_Mail_and_Usenet_News/

5) Tutorials:  (paths from OpenBSD)
	* "Advanced 4.4BSD IPC Tutorial"  at /usr/share/doc/psd/21.ipc/ 
	* "Introductory 4.4BSD IPC"       at /usr/share/doc/psd/20.ipctut/
   Just type make.

6) The Perl Cookbook code from chapters 16, 17, 18, and 20.
   That's at ftp://ftp.oreilly.com/published/oreilly/perl/cookbook/
   if you just want to download the code instead of geting the book.

7) You can look at the network-related examples at:
	http://www.perl.com/CPAN-local/authors/id/TOMC/scripts/

8) Any of Richard Stevens's Books:

    Unix Network Programming : Networking Apis: Sockets and Xti
	(Volume 1); by W. Richard Stevens

    UNIX Network Programming: Interprocess Communications (Volume 2);
	by W. Richard Stevens

    Advanced Programming in the Unix Environment (Addison-Wesley
	Professional Computing Series); by W. Richard Stevens

    TCP/IP Illustrated, Volume 1 : The Protocols (Addison-Wesley
	Professional Computing Series); by W. Richard Stevens

    TCP/IP Illustrated, Volume 2 : The Implementation (Addison-Wesley
	Professional Computing); Gary R.  Wright(Contributor), W. Richard
	Stevens

    TCP/IP Illustrated, Volume 3 : Tcp for Transactions, Http, Nntp,
	and the Unix Domain Protocols (Addison-Wesley Professional
	Computing Series); by W. Richard Stevens


Meanwhile, perhaps you find some kind soul direct you to some real
newsreader.  That miserable excuse for a UsenetBrowserTM that you're
using is utterly inadequate.  Note how it has mutilated the quoted text.
It looks like you've been hoodwinked into using a newsreader that wraps
lines for you incorrectly.  I certainly hope you didn't pay for the
software or service responsible for mangling your posting.

Let me explain.  For example, quoted text that looks like this:

    > It looks like you are using a newsreader that wraps 
    lines for you
    > incorrectly.  This is often a badly configured web browser.  
    If it's
    > netscape, I suggest you report the bug to them.  It mangles 
    your

Is very wrong.  This is especially prevalant in broken Mac or
PC newsreaders or browsers that have incorrectly implemented quoting.

Even lines that come out as:

    It looks like you are using a newsreader that wraps 
    lines for you
    incorrectly.  This is often a badly configured web browser.  
    If it's
    netscape, I suggest you report the bug to them.  It mangles 
    your
    posting beyond any reasonable ability to read.

These are certainly not very nice to look at, wouldn't you agree?
That's what you're sending out.  Surprised?  It's true.

Common pieces of software that seem particularly broken in this regard
seem to include MSIE and Netscape, but probably other mailers and
newsreaders as well.  The author/supplier of your software may already
have a fix for the problem.  Talk to them.  PC-based newsreaders (that
aren't running with a proper operating system installed) are notoriously
broken at this, although even (bad) Unix or mainframe software has had
the problem (like tin).  If you're paying an ISP who provided you a
newsreader, please tell them it is not up spec.  (Specs available.)

Also talk to your systems administrator, support personnel, or service
provider if this message doesn't make sense to you.  In the best of all
possible worlds, I would urge you to contact the author of the software
you used to post your message and explain to them that they're sending
out mutilated messages.  If I knew their email address, I would even do
it myself.

--tom
-- 
clueless> $SOCK_STREAM = 2  
    Huh?  use Socket or die!
	    --Tom Christiansen <tchrist@mox.perl.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 5479
**************************************

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