[22998] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5218 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Jul 12 11:07:18 2003

Date: Sat, 12 Jul 2003 08:05:09 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Sat, 12 Jul 2003     Volume: 10 Number: 5218

Today's topics:
    Re: Alternative to use vars (David Combs)
    Re: Alternative to use vars (Greg Bacon)
    Re: Alternative to use vars <bik.mido@tiscalinet.it>
    Re: Big hash question <newsreadermail@charter.net>
    Re: Carriage Return / Line Feed question <phignuton@_nospamplease_hotmail.com>
    Re: Check fileage with -M when path contains a point? (Math55)
    Re: Comparing two files.. <abigail@abigail.nl>
    Re: compiling Perl code <bart.lateur@pandora.be>
    Re: compiling Perl code (Joe Smith)
    Re: Connecting Unix to iSeries AS/400 DB2 <dominix<@>despammed.com>
    Re: converting word documents <jkeen@concentric.net>
    Re: flock() and W95 <grazz@pobox.com>
    Re: flock() and W95 <noreply@gunnar.cc>
    Re: flock() and W95 <noreply@gunnar.cc>
    Re: Help, perlcc bug or wrong code? <bart.lateur@pandora.be>
    Re: Matts Form Mail help - Redirect & Submit button in  (shane)
    Re: Matts Form Mail help - Redirect & Submit button in  <asu1@c-o-r-n-e-l-l.edu>
    Re: Matts Form Mail help - Redirect & Submit button in  <flavell@mail.cern.ch>
    Re: naming hash using a variable name. <bernie@fantasyfarm.com>
    Re: p book <jurgenex@hotmail.com>
        Problem uploading file of large size in Perl/Apache/Lin (Paresh Shah)
        Standalone Perlscript <t18_pilot@hotmail.spam.com>
    Re: Synchronizing two ftp sites/folders <nanae@perusion.com>
    Re: uninitialized value in pattern match (Joe Smith)
    Re: Wanted - push/rexec/pull script for remote program  (Joe Smith)
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Fri, 11 Jul 2003 17:02:18 +0000 (UTC)
From: dkcombs@panix.com (David Combs)
Subject: Re: Alternative to use vars
Message-Id: <bemqiq$bb9$2@reader1.panix.com>

In article <aa6egvkv440j3u8baqeugciu6ut6jrcsh4@4ax.com>,
Michele Dondi  <bik.mido@tiscalinet.it> wrote:
>  SNIP

>Another point that I wanted to discuss yesterday, but avoided to for
>various reasons, has to do with the well known
>natural-language-like-features-in-Perl issue: I read MJD's article on
>Perl's two mechanisms for local variables. I agree that they are

What MJD article, ie, you know its title, maybe
even the url?

Thanks

David



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

Date: Sat, 12 Jul 2003 12:20:20 -0000
From: gbacon@hiwaay.net (Greg Bacon)
Subject: Re: Alternative to use vars
Message-Id: <vgvv84j7tcol98@corp.supernews.com>

In article <bemqiq$bb9$2@reader1.panix.com>,
    David Combs <dkcombs@panix.com> wrote:

: In article <aa6egvkv440j3u8baqeugciu6ut6jrcsh4@4ax.com>,
: Michele Dondi  <bik.mido@tiscalinet.it> wrote:
: 
: >Another point that I wanted to discuss yesterday, but avoided to for
: >various reasons, has to do with the well known
: >natural-language-like-features-in-Perl issue: I read MJD's article on
: >Perl's two mechanisms for local variables. I agree that they are
: 
: What MJD article, ie, you know its title, maybe
: even the url?

Maybe "Seven Useful Uses of local"?

    http://perl.plover.com/local.html

Greg
-- 
What are governments but great bands of thieves?
    -- St. Augustine


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

Date: Sat, 12 Jul 2003 16:57:10 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: Alternative to use vars
Message-Id: <lb80hvsjr6f8afkr1fh44grms54ut55pc8@4ax.com>

On Sat, 12 Jul 2003 12:20:20 -0000, gbacon@hiwaay.net (Greg Bacon)
wrote:

>: What MJD article, ie, you know its title, maybe
>: even the url?
>
>Maybe "Seven Useful Uses of local"?
>
>    http://perl.plover.com/local.html

No, "Coping with scoping", at
<http://perl.plover.com/FAQs/Namespaces.html>


Michele
-- 
$\=q.,.,$_=q.print'  ,\g,,( w,a'c'e'h,,map{$_-=qif/g/;chr
}107..q[..117,q)[map+hex,split//,join' ,2B,, w$ECDF078D3'
F9'5F3014$,$,];];$\.=$/,s,q,32,g,s,g,112,g,y,' , q,,eval;


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

Date: Sat, 12 Jul 2003 04:46:00 -0500
From: "S. Heiling" <newsreadermail@charter.net>
Subject: Re: Big hash question
Message-Id: <vgvm6i3udq3nc7@corp.supernews.com>

"Tie your hash to a file, or use a database rather than a hash."

Well this is a rather odd experiment I'm tring.
And I'm trying to work it from a single script.

"Don't load the whole hash at startup."

How can I do that? Just simply being inside the script makes it load up
memory as far as I can tell. A long - long wait depending on size. I'd like
it to not load. I've tried to put it in a sub routine as well.

"If you want us to help you not load the whole hash at start-up,
you should show us the code that loads the hash, not the code that
later iterates over the hash."

I'm not loading it. It's just there.
And the script ends by running the hash.
This is what it looks like:

#####################################
%hash = (

key0 => "very long value.......",
key1 => "valy long value.......",

);
while ( ($key, $value) = each %hash) {

 # The keys are file names or directory paths.
 # The values are the file data unpacked into hex.."H"

}
#####################################

I've tried putting the hash after the while statement but still, a long
wait.
This is quite unconventional, I know, but is there a way?

Thanks.






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

Date: Sat, 12 Jul 2003 08:50:51 -0500
From: "Chris Kolosiwsky" <phignuton@_nospamplease_hotmail.com>
Subject: Re: Carriage Return / Line Feed question
Message-Id: <pan.2003.07.12.13.50.50.171629@_nospamplease_hotmail.com>

<original post -- 'snip'>

On Sat, 12 Jul 2003 00:06:58 +0000, David Efflandt wrote:

> It depends what OS the script is running on.  An OS that expects \x0d\0a
> for line endings (DOS/Win) is not going to recognize just \x0d (old Mac)  
> as a line ending.  An OS that uses \x0a for line endings would not
> recognize \x0d as a line ending and may give unexpected results with
> \x0d\x0a line endings.
> 
> So you should either convert data line endings to proper type for the OS
> the script is running on or, set $/ to whatever you expect actual line
> endings to be (see:  perldoc perlvar).
> 

I should have included this in the initial post, but the text file is
generated on a solaris machine and the script is being run from a linux
box using perl 5.8. When the file was ftp'd to a DOS box, the ascii
transfer converted the CR to CR/LF but that was to the DOS box. Another
file with only a CR (still running on a linux box) transferred via FTP
ascii (but not to a DOS machine) resulted in no output. A hex dump of the
first (DOS FTP) file shows the CR/LF and a hex dump of the second file
(unix -> linux FTP) shows only a CR. 

I will try setting $/ and update. Thanks!

>> The script gives the expected output in the CR/LF scenario, but int he
>> CR case, I get nothing.
> 
> Because no line endings were found and the data all ended up in one long 
> line, therefore, breaking your regex's.
> 

I had pretty much figured that this is what was happening (although, it
took me pretty much a whole day to ash it out... Ick.)

Thanks

Chris


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

Date: 12 Jul 2003 02:51:28 -0700
From: magelord@t-online.de (Math55)
Subject: Re: Check fileage with -M when path contains a point?
Message-Id: <a2b8188a.0307120151.67a7e6f7@posting.google.com>

"J. Gleixner" <glex_nospam@qwest.net> wrote in message news:<3lGPa.38$99.54122@news.uswest.net>...
> Math55 wrote:
> > hi, i have this program. why cant i check the age of a file with -M?
> > 
> > ---
> > use File::Basename;
> > $path="/home/raid/golchert/.cxoffice/dotwine/filelist.dat";
> > #$path="/home/raid/golchert/Downloads/CD Control QE 1.0.1.12.exe";
> > 
> > chdir (dirname($path));
> > $relFile= (fileparse($path));
> > $rf.="/".$relFile;
> > 
> > print "\n age of $path = ".(-M $rf). "\n" if (-M $rf <=100 && !(-d
> > $rf));
> > 
> > ---
> > 
> > maybe you have to change to a pth that contains a point at your
> > system. i tried with absolute and relative path, both did not
> > work:-(...
> 
> print the value of $rf and you should see your error.
> 
> No need doing a chdir, unless it's needed for something else, a -M $path 
> works fine.

hi, i printed $rf out, but i do not see what should be wrong:(....!
 ./filename does not work, /filename does not work.

what am i doing wrong?

THANKS


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

Date: 12 Jul 2003 11:18:56 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: Comparing two files..
Message-Id: <slrnbgvrkv.kth.abigail@alexandra.abigail.nl>

darkname (member31962@dbforums.com) wrote on MMMDCI September MCMXCIII in
<URL:news:3100901.1057942335@dbforums.com>:
^^  
^^  Hello everyone!
^^  
^^  I want to compare two files and get the number of the line where
^^  they match!
^^  
^^  Example:
^^  
^^   File1.txt              File2.txt
^^  
^^   a                      dsasadad
^^   b                      sadd
^^   b
^^   dsasadad
^^   sadd
^^   sdadas


#!/usr/bin/perl

use strict;
use warnings;

die "Usage $0 <file1> <file2>\n" unless 2 == @ARGV;

my %lines;

my ($file1, $file2) = @ARGV;

open my $fh1 => "<", $file1 or die "Failed to open $file1: $!\n";
open my $fh2 => "<", $file2 or die "Failed to open $file2: $!\n";

while (<$fh1>) {
    chomp;
    push @{$lines {$_}} => $.;
}

close $file1;

{
    local $" = ", ";
    while (<$fh2>) {
        chomp;
        print "$_: @{$lines{$_}}\n" if $lines {$_}
    }
}

close $file2;

__END__
-- 
use   lib sub {($\) = split /\./ => pop; print $"};
eval "use Just" || eval "use another" || eval "use Perl" || eval "use Hacker";


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

Date: Sat, 12 Jul 2003 10:43:23 GMT
From: Bart Lateur <bart.lateur@pandora.be>
Subject: Re: compiling Perl code
Message-Id: <v7pvgvsfuriia06kfd6o10s33mb0b6peg7@4ax.com>

-bill wrote:

>can PDB's be created where I can use the symbols files to help me
>debug a program?

Heh?

You don't need a symbols file to debug a program. Just start up your
script with the -d option specified. For info, check the perldebug POD
that comes with perl. Just run 

	perldoc perldebug

at the command line. Activeperl for Windows likely comes with this
document converted to html, and you can find copies for the various
versions of perl at <http://www.perldoc.com>, for example here:

	<http://www.perldoc.com/perl5.8.0/pod/perldebug.html>

While you're at it, also check out

	perldoc perldebtut

-- 
	Bart.


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

Date: Sat, 12 Jul 2003 12:01:02 GMT
From: inwap@inwap.com (Joe Smith)
Subject: Re: compiling Perl code
Message-Id: <2MSPa.351$603.19125@iad-read.news.verio.net>

In article <1b0363da.0307110844.7bcabe0d@posting.google.com>,
-bill <i_ching@yahoo.com> wrote:
>Bart Lateur <bart.lateur@pandora.be> wrote in message
>news:<o9bsgvs37gk4995jrevsn456badns7252g@4ax.com>...
>
>hey Bart,
>thanx for the info. Not sure if I get it....in a simple explanation ,

The answer was correct, but not appropriate to what you want.

>can PDB's be created where I can use the symbols files to help me
>debug a program?

1) Perl code is interpreted, not compiled.
2) Perl has a very powerful built-in debugger.

  C:\Work> perl -d program.pl arg1 arg2

	-Joe
-- 
See http://www.inwap.com/ for PDP-10 and "ReBoot" pages.


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

Date: Fri, 11 Jul 2003 23:20:17 -1000
From: "dominix" <dominix<@>despammed.com>
Subject: Re: Connecting Unix to iSeries AS/400 DB2
Message-Id: <3f0fd2d5$0$26592$626a54ce@news.free.fr>


"Biegster" <biegster@charter.net> wrote in message
news:4176c4f1.0307080610.3e50d352@posting.google.com...
> I am working on a conversion from Unix (HP-UX v10.20) compressed files
> to the iSeries DB2 on V5R2.  I cannot find a Perl DB400 driver that
> does not require the installation of IBM Application Developer Client
> on the Unix machine.  The version of HP-UX on this machine is WAY
> unsupported, and the sysadmins will not install anything on it, though
> I think I could get perl modules installed.
>

DB2 on AS400 has an ODBC connectivity,
you could try DBD::ODBC after compile/install of unixODBC lib
or libiodbc on the unix machine...

HTH

--
dominix




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

Date: 12 Jul 2003 12:28:45 GMT
From: "James E Keenan" <jkeen@concentric.net>
Subject: Re: converting word documents
Message-Id: <beoutt$k2m@dispatch.concentric.net>


"Zak Chababe" <zchababe@comcast.net> wrote in message
news:naKPa.38830$ye4.30120@sccrnsc01...
> Hi,
>  We are in the process of converting thousands of MS word documents into
> some sort of database files like sql or comma separated files. Is there
> something out there with Perl that allows me to convert all these word
> documents? Any help is appreciated.
>
> /Zak
>
Search the archives of this mailing list:
http://aspn.activestate.com/ASPN/Mail/Browse/Threaded/perl-win32-users
There has recently been discussion of how to save a Word document as a text
file (and the problems involved in that) in the thread "Problem Using
'unlink' within Script".




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

Date: Sat, 12 Jul 2003 09:38:28 GMT
From: Steve Grazzini <grazz@pobox.com>
Subject: Re: flock() and W95
Message-Id: <oGQPa.3792$Y92.3073@nwrdny01.gnilink.net>

Tassilo v. Parseval <tassilo.parseval@rwth-aachen.de> wrote:
> Also sprach Gunnar Hjalmarsson:
> > For this to work, it seems as if you need to pass the filehandles 
> > with typeglobs:
> > 
> >      flock *FH, LOCK_EX;
> > 
> There's a different approach that lets you use the bareword as 
> argument.  But it's still not quite like the inbuilt flock() since 
> you have to drop the comma:
 
The "*" prototype is pretty lame -- it lets you use the bareword, 
but it doesn't convert it into a glob reference.  In order to mimic
the builtin "*" prototype I think you'd need something like this:

    sub flock (*$) {
        my ($fh, $operation) = @_;
        unless (ref $fh) {
            no strict 'refs';
            $fh = *{caller()."::$fh"};
        }
        CORE::flock($fh, $operation);
    }

-- 
Steve


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

Date: Sat, 12 Jul 2003 13:41:45 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: flock() and W95
Message-Id: <beostf$7m98t$1@ID-184292.news.uni-berlin.de>

Tassilo v. Parseval wrote:
> Also sprach Gunnar Hjalmarsson:
>>Since flock() results in a fatal error on Windows 95 and 98, while I'm 
>>doing development on a W98 box, there are quite a few statements like 
>>this:
>>
>>     flock FH, LOCK_EX unless $W95;
>>
>>I'm thinking of making flock() generate a non-fatal error instead when 
>>run on W95 and W98 by defining CORE::GLOBAL::flock:

<snip>

> This looks like a lot of work when you could simply do:
> 
>     eval { flock FH, LOCK_EX or warn $! };
>     if ($@) {
>         # failed
>     }

There are maybe 30 or 40 flock() statements spread all over the 
program. The point is to handle that W95/98 problem, including flock() 
in Tie::File, with a few lines at one spot in the program.

>>For this to work, it seems as if you need to pass the filehandles with 
>>typeglobs:
>>
>>     flock *FH, LOCK_EX;
>>
>>Doing so works also when calling the built-in flock() function 
>>directly, so with this solution I'm able to use code that works the 
>>'normal' way as well.
> 
> There's a different approach that lets you use the bareword as argument.
> But it's still not quite like the inbuilt flock() since you have to drop
> the comma:
> 
>     sub IO::Handle::safeflock {
>         my $res = eval { flock $_[0], $_[1] };
>         return 1 if $@;
>         return $res;
>     }
>     
>     open F, "<", "file" or die $!;
>     safeflock F LOCK_EX or die $!;
> 
> It uses the indirect method invocation just like print() does.

Okay.. It doesn't handle Tie::File and other external modules, though. 
But how about this way of using eval:

     BEGIN {
         *CORE::GLOBAL::flock = sub(*$) {
             my $res = eval { CORE::flock $_[0], $_[1] };
             unless ($res) {
                 if ($@ =~ /unimplemented/) {
                     warn $@;
                     return 1;
                 }
             }
             return $res;
         };
     }

It would be a general method for making the errors from flock() 
non-fatal when flock() isn't implemented, not just for W95/98.

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl



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

Date: Sat, 12 Jul 2003 14:04:16 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: flock() and W95
Message-Id: <beou7n$7dapo$1@ID-184292.news.uni-berlin.de>

Steve Grazzini wrote:
> Tassilo v. Parseval <tassilo.parseval@rwth-aachen.de> wrote:
>>Also sprach Gunnar Hjalmarsson:
>>>For this to work, it seems as if you need to pass the filehandles 
>>>with typeglobs:
>>>
>>>     flock *FH, LOCK_EX;
>>
>>There's a different approach that lets you use the bareword as 
>>argument.  But it's still not quite like the inbuilt flock() since 
>>you have to drop the comma:
> 
> The "*" prototype is pretty lame -- it lets you use the bareword, 
> but it doesn't convert it into a glob reference.  In order to mimic
> the builtin "*" prototype I think you'd need something like this:
> 
>     sub flock (*$) {
>         my ($fh, $operation) = @_;
>         unless (ref $fh) {
>             no strict 'refs';
>             $fh = *{caller()."::$fh"};
>         }
>         CORE::flock($fh, $operation);
>     }

So it is possible. :)  Thanks, I'll consider it. Or maybe that would 
be to overdo it; needing to use the typeglobe in the filehandle 
argument isn't that inconvenient.

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl



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

Date: Sat, 12 Jul 2003 10:37:31 GMT
From: Bart Lateur <bart.lateur@pandora.be>
Subject: Re: Help, perlcc bug or wrong code?
Message-Id: <q4ovgvggj1s46t9hbqmt4kekotq17o4nkh@4ax.com>

Gareth Glaccum wrote:

>Great, thanks. Although as far as I understand, pp is much less use for
>hiding the code, which is what my boss wants. I will do it anyway, I mean
>would the difference be noticed?

Oh dear.

A reasonable tool for hiding the source from non-experts, is perl2exe
from IndigoStar. 

	<http://www.indigostar.com/perl2exe.htm>.

perl2exe builds an exe file, and hides the source in it in a slightly
encrypted manner. As can be seen as discussed here:

	<http://perlmonks.org/index.pl?node_id=237943>

it will not stop perl experts from being able to extract your code...
but IMO those experts are the least likely people to want to steal your
code anyway.

perl2exe is not free, but I wouldn't call it expensive, either. You can
download it and try it out, the unregistered version will display a
banner in the console window for a few seconds, when the program
terminates.

There's also PerlApp from ActiveState


<http://aspn.activestate.com/ASPN/Perl/Reference/Products/PDK/PerlApp/What.html>

which is a very similar product. But the source is not encrypted at all,
the source is plainly visible by simply looking at it with a hex editor,
or even with notepad. Still, the fact that it's an .exe file likely will
be enough to deter most people.

-- 
	Bart.


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

Date: 12 Jul 2003 04:51:12 -0700
From: seherrell@yahoo.com (shane)
Subject: Re: Matts Form Mail help - Redirect & Submit button in body of email
Message-Id: <3a6a0c09.0307120351.3b493376@posting.google.com>

That didn't work. It just put ">" on my form. Here is the line again. 

<p align="center"><input type="submit" value="Submit" name="Submit" tabindex="9">
<input type="reset" value="Reset" name="B2"></p>
</form>





"A. Sinan Unur" <asu1@c-o-r-n-e-l-l.edu> wrote in message news:<Xns93B5A1872D560asu1cornelledu@132.236.56.8>...
> seherrell@yahoo.com (shane) wrote in 
> news:3a6a0c09.0307111145.6e19e97b@posting.google.com:
> 
> > I am redirecting the person to a confirmation page and sending the
> > results to an email address. The problem is the redirect string and
> > the Submit button show up in the body of the email. What am I doing
> > wrong. Below is the script.
>  ... 
> > <form action="http://www.myurlhere.com/cgi-sys/FormMail.cgi"
> > method=post
> 
> add a ">" at the end of this line and try again.
> name="B2"></form>


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

Date: 12 Jul 2003 12:54:57 GMT
From: "A. Sinan Unur" <asu1@c-o-r-n-e-l-l.edu>
Subject: Re: Matts Form Mail help - Redirect & Submit button in body of email
Message-Id: <Xns93B65AB3558F4asu1cornelledu@132.236.56.8>

seherrell@yahoo.com (shane) wrote in
news:3a6a0c09.0307120351.3b493376@posting.google.com: 

> "A. Sinan Unur" <asu1@c-o-r-n-e-l-l.edu> wrote in message
> news:<Xns93B5A1872D560asu1cornelledu@132.236.56.8>... 
>> seherrell@yahoo.com (shane) wrote in 
>> news:3a6a0c09.0307111145.6e19e97b@posting.google.com:
>> 
>> > I am redirecting the person to a confirmation page and sending the
>> > results to an email address. The problem is the redirect string and
>> > the Submit button show up in the body of the email. What am I doing
>> > wrong. Below is the script.
>>  ... 
>> > <form action="http://www.myurlhere.com/cgi-sys/FormMail.cgi"
>> > method=post
>> 
>> add a ">" at the end of this line and try again.
>> name="B2"></form>
> 
> That didn't work. It just put ">" on my form. Here is the line again. 
> 
> <p align="center"><input type="submit" value="Submit" name="Submit"
> tabindex="9"> <input type="reset" value="Reset" name="B2"></p>
> </form>

Well, my ooooops. I accidentally included the "name="B2"></form>". I was 
actually referring to your <form> opening tag just above my comment. So, 
add the closing ">" to the end of your form tag. This is how it appears 
in your HTML right now:

<form action="http://www.myurlhere.com/cgi-sys/FormMail.cgi"
method=post
           ^ need closing ">" here.

Hope this is clearer.

Sinan.

-- 
A. Sinan Unur
asu1@c-o-r-n-e-l-l.edu
Remove dashes for address
Spam bait: mailto:uce@ftc.gov


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

Date: Sat, 12 Jul 2003 15:58:22 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Matts Form Mail help - Redirect & Submit button in body of email
Message-Id: <Pine.LNX.4.53.0307121550410.23063@lxplus003.cern.ch>

On Sat, Jul 12, shane yelled out atop a fullquote:

> That didn't work.

The indications are that you need to learn HTML.  You don't learn that
on comp.lang.perl.misc.

What you _could_ learn on comp.lang.perl.misc is its posting
guidelines[1], many of which will stand you in good stead on any
technical Usenet group, including comp.infosystems.www.authoring.html
(that might be a hint).

Matt's CGI scripts are _not_ a good place to start.  Some of them have
finally been tamed to the point where they're not actually a security
disaster, but they don't apply current best-practice in Perl
programming, not by a long chalk.  Have you looked at
http://nms-cgi.sourceforge.net/ yet?

good luck

[1] also available at
http://mail.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html



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

Date: Sat, 12 Jul 2003 06:33:30 -0400
From: Bernie Cosell <bernie@fantasyfarm.com>
Subject: Re: naming hash using a variable name.
Message-Id: <rsovgv8927cee0eb55olilj1tc03ku48is@library.airnews.net>

tadmc@augustmail.com (Tad McClellan) wrote:

} You should (eventually) read each and every FAQ, there is bound
} to be lots of similarly time-saving thingies that you are as yet
} unaware of.
} 
} The FAQ is ineffective when you do not read it.  :-)  :-)

Then again, the FAQ would be a *LOT* more handy if it had a better search
engine...  [even when I *KNOW* what I'm looking for is one of the FAQ
items, I find it often hard to remember/guess what word appears in the
question so I can find it with a search].

  /Bernie\

-- 
Bernie Cosell                     Fantasy Farm Fibers
bernie@fantasyfarm.com            Pearisburg, VA
    -->  Too many people, too few sheep  <--          


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

Date: Sat, 12 Jul 2003 10:37:05 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: p book
Message-Id: <lxRPa.4727$eY3.1111@nwrddc01.gnilink.net>

Tad McClellan wrote:
> A. Sinan Unur <asu1@c-o-r-n-e-l-l.edu> wrote:
>> john62@electronmail.com wrote in news:3f0f8875$1_2@127.0.0.1:
>>> any recommendations for a
>>> beginner book?
>>
>> perldoc perlbook
>
>
> The Camel book is _not_ a good book for a beginner, get
> a "tutorial" type of book first.

I beg to differ.
If you have programming experience then the Camel book is perfect for a
beginner in Perl because it has a brief introductory section and the main
part can be used as reference for years to come.
Any of those tutorial type books are too shallow and at most you should
borrow them from the library because you won't look at them again after the
first 2 weeks.

If you are a beginner in programming then you are certainly right.

And if you are a beginner in CGI and want to use Perl for CGI then you need
much more than just a Perl book.

So it very much depends upon in which discipline the OP is a beginner, Perl
or programming?

jue




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

Date: 12 Jul 2003 05:03:32 -0700
From: pareshrshah@yahoo.com (Paresh Shah)
Subject: Problem uploading file of large size in Perl/Apache/Linux
Message-Id: <d5316768.0307120403.16551df1@posting.google.com>

Hi

need an urgent help!!!!!!

I m facing problem with uploading a file to my server using http
protocol
I have one perl script which upload file to server, using Apache as
http server & Redhat Linux as OS.
Till 11th july, 2003 everything was working fine & suddenly from 12th
july i.e. today it started giveing problems. I can upload file with
size < 100K, but other files > 100K are not being uploaded. It
timeouts.....

Please help me
Thanks in advance

Regards
Paresh Shah


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

Date: Sat, 12 Jul 2003 13:29:54 GMT
From: "William Hymen" <t18_pilot@hotmail.spam.com>
Subject: Standalone Perlscript
Message-Id: <m3UPa.43035$C83.3414102@newsread1.prod.itd.earthlink.net>

I have a perl script which I would like
to run 'standalone'. In other words, I ONLY want
to have gnu perl.exe available, and nothing more.
I am not permitted to install perl in a production
environment on NT or W2K here at work.

The only function I need to include in the
script is cwd.  Which is used as
$folder=getcwd();

How do I include this function in my script as a subroutine
to make it truely a 'standalone' script which
will run as
a:\perl.exe c:\temp\script.pl

Thanks in advance,

Bill





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

Date: Sat, 12 Jul 2003 14:01:40 GMT
From: Perusion Hostmaster <nanae@perusion.com>
Subject: Re: Synchronizing two ftp sites/folders
Message-Id: <slrnbh0574.u3v.nanae@bill.heins.net>

In article <bekgvk$mnl$1@hercules.btinternet.com>, Gareth Glaccum wrote:
[top-posting fixed]
> "Perusion hostmaster" <nanae@perusion.com> wrote in message
> news:slrnbglqmm.1hv.nanae@ns.valuemedia.com...
>> > Does anyone know of any kind of shell script/perl script which we
>> > could run which could recursively look at each folder on the live site
>> > and STAGING, and if any files are out of date on live copy them up
>> > from STAGING to live?
>> >
>> Perl is not the best thing for the job, rsync(1) is:
> 
> Assuming un*x on both machines yes.

Cygwin has a working rsync too, and now that Mac OS/X is out it
should be there as well (though I don't know that for sure).

> However, if perl is the way you want to
> go, try w3mir (search on google for it). It hasn't been updated for a while,
> but it is designed to copy websites. Will even perform username and password
> authentication if your staging site is protected.

I have used w3mir, but consider it too long in the tooth to use any more
when I have a better alternative. Yet if all you have is an FTP account,
you are right -- it may be the best thing.

-- 

Few blame themselves until they have exhausted all other possibilities.
 -- anonymous


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

Date: Sat, 12 Jul 2003 11:44:04 GMT
From: inwap@inwap.com (Joe Smith)
Subject: Re: uninitialized value in pattern match
Message-Id: <8wSPa.350$603.19125@iad-read.news.verio.net>

In article <ef58b788.0307111056.341b91ca@posting.google.com>,
gilgames <gilgames@aol.com> wrote:
>#!/usr/bin/perl
>
>use warnings;
>use strict "refs";
>use strict "subs";
>use strict "vars";
>
>our $netscape;
>$netscape = ($ENV{HTTP_USER_AGENT} =~ /netscape/i ) ? 1 : 0;

That's going to cause a warning if $ENV{HTTP_USER_AGENT} is undefined.

  $ENV{HTTP_USER_AGENT} = "None" unless defined $ENV{HTTP_USER_AGENT};
  $netscape = $ENV{HTTP_USER_AGENT} =~ /netscape/i;

	-Joe
-- 
See http://www.inwap.com/ for PDP-10 and "ReBoot" pages.


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

Date: Sat, 12 Jul 2003 12:13:46 GMT
From: inwap@inwap.com (Joe Smith)
Subject: Re: Wanted - push/rexec/pull script for remote program builds
Message-Id: <_XSPa.352$603.19125@iad-read.news.verio.net>

In article <d27434e.0307100917.35665a0c@posting.google.com>,
John Ramsden <john_ramsden@sagitta-ps.com> wrote:
>Each time I amend the source I must manually FTP the updated file[s]

  rsync -auv -e ssh work_dir/ remotehost:work_dir/

>to a couple of remote systems, compile it on each of these these,

  ssh remotehost 'cd work_dir; make'

>and FTP the resulting runfiles back to the development system.

  rsync -auv -e ssh remotehost:work_dir/ work_dir/

I've done the above where the local machine was Windows-98 with Cygwin
(http://www.cygwin.com/) installed and the remote host was Solaris.
You can use .ssh/authorized_keys to avoid the password prompt.

>It needn't be an all singing and dancing system; in fact I'd rather it
>wasn't - All I need is the ability to push a configurable set of files
>to a configurable remote directory, rexec a build script there, and
>pull back the result[s] as binary files.

The above three commands can be put into a bash shell script.

	-Joe
-- 
See http://www.inwap.com/ for PDP-10 and "ReBoot" pages.


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

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.

For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V10 Issue 5218
***************************************


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