[11537] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5137 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Mar 15 10:07:23 1999

Date: Mon, 15 Mar 99 07:00:29 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Mon, 15 Mar 1999     Volume: 8 Number: 5137

Today's topics:
    Re: *** FAQ: ANSWERS TO YOUR QUESTIONS! READ FIRST! Pos (I R A Aggie)
    Re: 5.003-5.004 compatibility (Randal L. Schwartz)
    Re: [Q] Popping an array element (M.J.T. Guy)
    Re: ActivePerl Win32 PPM and DBD-Sybase package <neil_marks@uk.ibm.com>
        any perl4 hackers want to try their hand at this? <kidkaboom@techplus.com>
    Re: Better Sort, Please <jdf@pobox.com>
    Re: Bit vectors <jhi@alpha.hut.fi>
    Re: Bit vectors <sb@sdm.de>
    Re: Check return values on close() <zenin@bawdycaste.org>
    Re: Cookie Help! <eedalf@eed.ericsson.se>
        Datastream API Problem Help! <dimensions@dialaccess.com>
    Re: hashes ???????? <andy@andymen.demon.co.uk>
    Re: List of Lists <andy@andymen.demon.co.uk>
        NEWBIE: help understanding && (Rory Campbell Lange)
    Re: NEWBIE: help understanding && <Tony.Curtis+usenet@vcpc.univie.ac.at>
        Pentium III Chips Released with IDs - Intel won't budge (Intel no one)
    Re: Perl Keeps reading the A: drive <Allan@due.net>
        perl man page for DOS (big-perl) <peter.field@sh.bel.alcatel.be>
    Re: Perl, IIS, writing to network drives ancics@cibc.ca
    Re: Scalar/array question <andy@andymen.demon.co.uk>
    Re: Scalar/array question (Tad McClellan)
    Re: UNIQUE variable... <wells@cedarnet.org>
    Re: UNIQUE variable... (Bart Lateur)
    Re: unlink a filename with spaces (Tad McClellan)
    Re: Upload: 0 Bytes <ntogmi@abs.ascom.ch>
        Using Select on STDIN ??? <forrestg@uregina.ca>
    Re: viewing contents of *.html files <zenin@bawdycaste.org>
    Re: Web mail reader? <JimOrona@ElegantSolutionsInc.com>
        Where to start with Perl <tom.kralidis@ccrsDotnrcandOtgc.ca>
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: 15 Mar 1999 14:33:43 GMT
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: *** FAQ: ANSWERS TO YOUR QUESTIONS! READ FIRST! Posted Twice Weekly ***
Message-Id: <slrn7eq743.gol.fl_aggie@stat.fsu.edu>

On Sat, 13 Mar 1999 21:57:56 GMT, jeff@axismutatis.net
<jeff@axismutatis.net> wrote:

+ I seriously doubt your time is terribly important. Most of your replies in
+ this newsgroup are either filled with sarcasm or insults, and aren't terribly
+ informative at all.

I find Abigail's posts to be topical and informative.

+ The guy has a point - not everything is answered in a FAQ. Not every question
+ is frequent. Sometimes, the answer given in a FAQ is unclear. Many people
+ come here when the FAQs have failed them.

Absolutely. Nothing wrong with that. At least then they can formulate
an intelligent question. What Mr. Fry was complaining about was the
near-constant posting of the Pointers to the FAQ, and How To Find The
FAQ.

There's a very good reason why those are posted regularly. Since you're
so smart, I'll let you tell us why.

+ Everyone was a newbie once, why don't you help them along rather than
+ alienate them?

Are you volunteering your time for the Usenet Perl Help Desk? If you aren't,
why do you demand others do so?

There's a tendency to help those who help themselves (to the FAQs, the
online documents, DejaNews, and the many books). Posting to usenet should
be your last resort.

James


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

Date: 15 Mar 1999 06:59:39 -0800
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: 5.003-5.004 compatibility
Message-Id: <m1emmqre78.fsf@halfdome.holdit.com>

>>>>> "John" == John Stoner <jstoner@generosity.org> writes:

John> I've heard there are some minor incompatibilities between the two...is
John> this true?    What are they?

The differences between 5.003 and 5.004 are not as important as the
differences between 5.003 and the *current* version, 5.005_02.  But,
as my associate brian d foy pointed out, it's nearly all documented in
the "perldelta" pages for each new release.

print "Just another Perl hacker,"

-- 
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: 15 Mar 1999 13:09:10 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: [Q] Popping an array element
Message-Id: <7cj0pm$c61$1@pegasus.csx.cam.ac.uk>

Andre L. <alecler@cam.org> wrote:
>In article <7cgqph$2rq$1@news.ee.nthu.edu.tw>, Chi-Feng Wu
><cfwu@slugger.ee.nthu.edu.tw> wrote:
>
>>    The Book tell us that 
>>    $tmp = pop ARRAY
>>    has the same effect as
>>    $tmp = $ARRAY[$#ARRAY--];
>
>Maybe that used to be true at the time that entry in perlfunc was written,
>but it seems that it is no longer correct (not with perl 5.004_04 anyway).

Actually, it looks like that *never* worked  -  it certainly fails in
Perl4.

>It looks like the array is shrunk before the assignation is made,
>resulting in $tmp getting an undefined value.


Mike Guy


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

Date: Mon, 15 Mar 1999 13:00:01 +0000
From: Neil Marks <neil_marks@uk.ibm.com>
Subject: Re: ActivePerl Win32 PPM and DBD-Sybase package
Message-Id: <36ED0451.DF2923BF@uk.ibm.com>

I've uninstalled and re-installed build 5.009 of ActivePerl and the above
module and the problem no loner exists...
Regards,

Neil Marks wrote:

> I've downloaded and attempted to install the above package with PPM, but
> everytime I run ppm I get the following error messages:
> Attribute VERSION=" missing an ending quote.
> Attribute VERSION=" missing an ending quote.
> Attribute VERSION=" missing an ending quote.
> Attribute VERSION=" missing an ending quote.
> Attribute VERSION=" missing an ending quote.
> Attribute VERSION=" missing an ending quote.
> Attribute VERSION=" missing an ending quote.
> Attribute VERSION=" missing an ending quote.
> Writing D:\Perl\site\lib/auto/DBD-Sybase/.packlist
> Attribute VERSION=" missing an ending quote.
> Attribute VERSION=" missing an ending quote.
> Attribute VERSION=" missing an ending quote.
> Attribute VERSION=" missing an ending quote.
> Attribute VERSION=" missing an ending quote.
> Attribute VERSION=" missing an ending quote.
> Attribute VERSION=" missing an ending quote.
> Attribute VERSION=" missing an ending quote.
>
> Yes... it's repeated several times... I've looked at the ppd file and it
> appears to be correctly formatted. See extract below!
> <SOFTPKG NAME="DBD-Sybase" VERSION="0,13,0,0">
>  <TITLE>DBD-Sybase</TITLE>
>  <ABSTRACT>DBI driver for Sybase datasources</ABSTRACT>
>  <AUTHOR>Michael Peppler (mpeppler@mbay.net)</AUTHOR>
>  <IMPLEMENTATION>
>   <OS NAME="MSWin32" />
>   <ARCHITECTURE NAME="MSWin32-x86-object" />
>   <CODEBASE HREF="x86/DBD-Sybase.tar.gz" />
>  </IMPLEMENTATION>
> </SOFTPKG>
>
> Does anyone have any clues as why this is happening??
> Thanks,
> Neil



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

Date: Mon, 15 Mar 1999 14:51:08 GMT
From: Kid Kaboom <kidkaboom@techplus.com>
Subject: any perl4 hackers want to try their hand at this?
Message-Id: <36ED1E19.2E7E443D@kidkaboom.frogspace.net>

Hi, I'm a beginning perl (v5.004) programmer and I found this totally
awesome access statistic script. You may be familiar with it. Its Matt
Kruse's POV Ray access stat one
<http://mkruse.netexpress.net/www/scripts/access3/> but it it written
for perl 4.036 and my server doesn't have that version of perl, and my
sysadmin doesn't want to install perl 4.036.  I have also found (I;m a
win32 user) that when I downloaded perl 4.036 for dos it can't handle 9
meg files, but perl 5 can, so I would like to port (I believe this is
teh right word) this script to the latest version of perl.

If anyone here is knowledgeable in perl 4.036 and would like to help me,
I would be very grateful.

>From Theodore
(maybe you could reply by email as well, my newsgroups are kind of
finicky)



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

Date: 15 Mar 1999 09:53:03 -0500
From: Jonathan Feinberg <jdf@pobox.com>
To: moseley@best.com (Bill Moseley)
Subject: Re: Better Sort, Please
Message-Id: <m3iuc2hkj4.fsf@joshua.panix.com>

moseley@best.com (Bill Moseley) writes:

> push @sortarray,
>     {
>        KEY   => $reference_of_thing_Im_sorting,
>        SORT1 => $primary_sort_key,
>        SORT2 => $secondary_sort_key,
>     };

If I understand you, then this is a good case for eval STRING.

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

   my @a = (
	    { key => 'the second thing',
	      s1  => '1',
	      s2  => 'a',
	    },
	    { key => 'the third thing',
	      s1  => '2',
	      s2  => 'a',
	    },
	    { key => 'the first thing',
	      s1  => '1',
	      s2  => 'b',
	    },
	    { key => 'the fourth thing',
	      s1  => '3',
	      s2  => 'z',
	    },
	   );

   my %comparison = ( s1 => { type => 'n', order => 'a' },
		      s2 => { type => 's', order => 'd' },
		    );

   sub build_sort_sub {
     my $comps = join ' || ', map {
       my ($a, $b) = ($comparison{$_}->{order} eq 'a') ? ('a','b') : ('b','a');
       my $op = ($comparison{$_}->{type} eq 'n') ? '<=>' : 'cmp';
       "\$$a" . "->{$_} $op \$$b" . "->{$_}"
     } sort keys %comparison;
     eval 'sub {' . $comps . '}';
   }

   my $sort = build_sort_sub();
   my @sorted = sort { &$sort } @a;
   for (@sorted) { print "$_->{key}\n" }

-- 
Jonathan Feinberg   jdf@pobox.com   Sunny Brooklyn, NY
http://pobox.com/~jdf


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

Date: 15 Mar 1999 14:58:20 +0200
From: Jarkko Hietaniemi <jhi@alpha.hut.fi>
Subject: Re: Bit vectors
Message-Id: <oeer9qqdi4z.fsf@alpha.hut.fi>


Steffen Beyer <sb@sdm.de> writes:

> In article <36EB3132.9D87C99E@sprynet.com>, prauz <prauz@sprynet.com> wrote:
> 
> > I saw at amazon.com an interview with Tom Christiansen and he mentioned
> > 'bit vectors' as a powerful, but little publicized feature of perl.
> > Anyone info on them ?
> 
> Download http://www.engelschall.com/u/sb/download/pkg/Bit-Vector-5.6.tar.gz
> (or from http://www.perl.com/CPAN/authors/id/STBEY/Bit-Vector-5.6.tar.gz).

Steffen, I fully understand that you want to publicize Bit::Vector :-)
but methinks that was not what Tom was talking about.

Bit vectors are available in completely standard Perl, take a look at
vec() function and operators & | ^ ~ (and pack() function, if you want
to input/output the vectors).

-- 
$jhi++; # http://www.iki.fi/jhi/
        # There is this special biologist word we use for 'stable'.
        # It is 'dead'. -- Jack Cohen


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

Date: 15 Mar 1999 13:58:22 GMT
From: Steffen Beyer <sb@sdm.de>
Subject: Re: Bit vectors
Message-Id: <7cj3lu$4i5$1@solti3.sdm.de>

In article <oeer9qqdi4z.fsf@alpha.hut.fi>,
Jarkko Hietaniemi <jhi@alpha.hut.fi> wrote:

> Steffen Beyer <sb@sdm.de> writes:

> > In article <36EB3132.9D87C99E@sprynet.com>,
> > prauz <prauz@sprynet.com> wrote:
> > 
> > > I saw at amazon.com an interview with Tom Christiansen and he mentioned
> > > 'bit vectors' as a powerful, but little publicized feature of perl.
> > > Anyone info on them ?
> > 
> > Download http://www.engelschall.com/u/sb/download/pkg/Bit-Vector-5.6.tar.gz
> > (or from http://www.perl.com/CPAN/authors/id/STBEY/Bit-Vector-5.6.tar.gz).

> Steffen, I fully understand that you want to publicize Bit::Vector :-)
> but methinks that was not what Tom was talking about.

How should I know what Tom was talking about?! :-)

I only had this posters article as my only reference, so how should I be
able to tell? :-)

I can't make researches on the Internet for every newspost I read...

> Bit vectors are available in completely standard Perl, take a look at
> vec() function and operators & | ^ ~ (and pack() function, if you want
> to input/output the vectors).

That's a pretty valid information.

I knew somebody would make this suggestion anyway, that's why I didn't
bother to write it down myself... :-)

Another reason is that "vec()" is found rather counter-intuitive by most
beginners and gives rise to many questions, whereas my module seems to be
more intuitive (going by the almost complete absence of beginners questions
concerning this module) and also offers a lot more possibilities than "vec()".

Moreover, it has a nice OO interface and it's written in C internally, thus
you don't have any speed penalty involved.

On the contrary, the module uses only "best-practice", efficient algorithms
and therefore should be even faster than solutions using "vec()" in many
cases.

Best regards,
-- 
    Steffen Beyer <sb@engelschall.com>
    http://www.engelschall.com/u/sb/download/    (Free Perl and C Software
    http://www.perl.com/CPAN/authors/id/STBEY/         for Download)
    New: Build'n'Play 2.1.0 (all-purpose Unix batch installation tool)
    http://www.oreilly.de/catalog/perlmodger/bnp.html


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

Date: 15 Mar 1999 12:16:45 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: Check return values on close()
Message-Id: <921500476.462296@thrush.omix.com>

Eric Bohlman <ebohlman@netcom.com> wrote:
	>snip<
: :     return "Failed close of sendmail:$sendmail:$!" unless (close MAIL);
: If there were problems running sendmail, this is where they'll show up.

	Sendmail isn't that friendly.  It will (often) exit 0 even when it
	encounters errors.  You need to check its stderr AND stdout (yes,
	the stupid think likes to send some errors to stdout and not err).

	You might want to take a look at:

	ftp://thrush.omix.com/pub/perl/modules/Mail-Sendmail-1.10.tar.gz

	This is not the same as the Mail::Sendmail on CPAN (which has
	absolutely nothing to do with sendmail btw...).

-- 
-Zenin (zenin@archive.rhps.org)           From The Blue Camel we learn:
BSD:  A psychoactive drug, popular in the 80s, probably developed at UC
Berkeley or thereabouts.  Similar in many ways to the prescription-only
medication called "System V", but infinitely more useful. (Or, at least,
more fun.)  The full chemical name is "Berkeley Standard Distribution".


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

Date: Mon, 15 Mar 1999 14:30:39 +0100
From: Alex Farber <eedalf@eed.ericsson.se>
To: Brian Enderle <benderle@mindspring.com>
Subject: Re: Cookie Help!
Message-Id: <36ED0B7F.BE896FAA@eed.ericsson.se>

Brian Enderle wrote:
> Can anyone direct me to (hopefully) an on-line or downloadable file that
> explains how to use cookies; ie. writing, reading, etc.

Hi Brian,

my advice is not to reinvent a wheel and let the CGI.pm handle cookies
(even multiple cookies!) for you. Type "perldoc CGI" and search for
"cookie" to learn more.

Regards
Alex


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

Date: Mon, 15 Mar 1999 08:20:50 -0600
From: "Dimensions" <dimensions@dialaccess.com>
Subject: Datastream API Problem Help!
Message-Id: <iH8H2.3022$Bd3.51905@newsfeed.slurp.net>

I am using a script to get shipping costs from UPS directly into my script.
But, I am not getting any data back.

I checked links to web site, strings, etc It all works. I just cant get
the data back into the variable: $resultlist

It must be something about communication, and I am not too good at that yet!

Please anyone, help!

Etal

Here is the script:

# Define minimum values for shipping
$upsAction = "3";
$upsProduct = "1DP";
$OriginPostalCode = "77381";
$DestZipCode = "10005";
$PackageWeight = "8";


# Script from UPS
$function = "GET"; #Type of HTTP
$workFile = "/using/services/rave/qcostcgi.cgi";
$versionInfo = "HTTP/1.0\n\n";
$workString = "?";
$workString .= "accept_UPS_license_agreement=yes";
$workString .= "&";
$workString .= "10_action=$upsAction";
$workString .= "&";
$workString .= "13_product=$upsProduct";
$workString .= "&";
$workString .= "15_origPostal=$OriginPostalCode";
$workString .= "&";
$workString .= "19_destPostal=$DestZipCode";
$workString .= "&";
$workString .= "23_weight=$PackageWeight";
$request = "$function $workFile$workString $versionInfo";
#
# Initialize communications to the server
#
if (!&InitCommunications()) # This is a function to establish a socket
connection
{
  # send request to server
  #
  print S "$request\n";
  #
  # retrieve answer sent back from the server
  #
  $resultlist = '';
  while (<S>)
   {
    $resultlist .=$_;
   }
  close(S);
## JUST FOR TEST PURPOSE: print result on screen
  print "<p>The result: $resultlist</p>";
}

#
# Initialize Inter-process communications
#
sub InitCommunications
{
$hostname = MY_WEB_SITE.com;

## The following data provided by UPS
$AF_INET = 2;
$SOCK_STREAM = 2;
$sockaddr = "S n a4 x8";
$port = 80;
$them = "www.ups.com";

## This part is from UPS, unchanged
    $errmsg = "";
    #
    # get info for socket open
    #
    ($name, $aliases,$proto) = getprotobyname('tcp');
    ($name, $aliases,$port) = getservbyport($port,'tcp') unless $port
=~/^\d+$/;

    ($tname, $aliases,$type, $len, $thisaddr) = gethostbyname($hostname);
    ($name, $aliases,$type, $len,$thataddr) = gethostbyname($them);

    #
    # pack information into structure for socket open
    #
    $this = pack($sockaddr, $AF_INET, 0, $thisaddr);
    $that = pack($sockaddr, $AF_INET, $port, $thataddr);
    #
    # Create the socket filehandle
    #
    eval
    {
        alarm($connect_timeout);
        if (socket(S, $AF_INET, $SOCK_STREAM, $proto) < 0)
        {
          $raveServer = 0;
           return 0;
        }
        #
        # disable buffering, flush after each write/print
        #
        select(S);
        $| = 1;
        select(STDOUT);
        if (bind(S, $this) < 0)
        {
           $raveServer = 0;
        return 0;
        }
        if (!connect(S, $that))
        {
           $raveServer = 0;
        return 0;
        }
        alarm(0);
    };
return $raveServer;
}





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

Date: Mon, 15 Mar 1999 13:36:05 +0000
From: Andy Mendelsohn <andy@andymen.demon.co.uk>
To: pdz@barclab.com
Subject: Re: hashes ????????
Message-Id: <36ED0CC5.F86C1C5B@andymen.demon.co.uk>

pdz@barclab.com wrote:
> 
> Can anyone explain how hashes works, and how to use them.
> Thanks
> 
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own

Do 'man perldata' (or perldoc perldata). 

hth 
andy


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

Date: Mon, 15 Mar 1999 13:47:10 +0000
From: Andy Mendelsohn <andy@andymen.demon.co.uk>
To: Sheila Eugenio <seugenio@man.amis.com>
Subject: Re: List of Lists
Message-Id: <36ED0F5E.DEA087D8@andymen.demon.co.uk>

Sheila Eugenio wrote:
> 
> Hi!
>         I have a CGI program which makes use of the Chart Module.  Can anyone
> please tell me how I can add datapoints to @data from my form such that
> when a user enters a 11 & 5.6  to the fields respectively:
> 
> $ww = $q->param('$workweek');
> $ct  = $q->param('$cycle_time');
> 
> @data becomes:
> 
> @data = ( [09, 10, 11],
>            [7.5,6.8,5.6]);
> Can the array keep the data so that the next combination will be added at
> end? Or do you have a better idea?
> 
> Any help is greatly appreciated. Thanks!

Something like this maybe? :

push(@{$data[0]},$ww);
push(@{$data[1]},$ct);



hth
andy


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

Date: Mon, 15 Mar 1999 14:01:47 -0100
From: 'x'campbell-lange@easynet.co.uk (Rory Campbell Lange)
Subject: NEWBIE: help understanding &&
Message-Id: <'x'campbell-lange-1503991401470001@campbell-lange.easynet.co.uk>


Hi
I'm working through a Perl book I have bought, and I'm a little confused
by the operator &&
If I go:
$x = 1;
$$y = 2;
$x < $y && $x*4;
print $x;
$x doesn't evaluate to 4, as I would expect.

I'd be grateful for some help
Rory

-- 
Rory Campbell-Lange
The Campbell-Lange Workshop
Remove the 'x' to reply


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

Date: 15 Mar 1999 15:09:00 +0100
From: Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>
Subject: Re: NEWBIE: help understanding &&
Message-Id: <83aexesv43.fsf@vcpc.univie.ac.at>

Re: NEWBIE: help understanding &&, Rory <x> said:

Rory> Hi I'm working through a Perl book I have
Rory> bought, and I'm a little confused by the
Rory> operator && If I go:
Rory> $x = 1;
Rory> $$y = 2;
Rory> $x < $y && $x*4;        [*]
Rory> print "$x\n";

Rory> $x doesn't evaluate to 4, as I would expect.

Line [*] above doesn't perform any assignment, it's
just an expression.  Are you sure you mean "$$y" as
well?

(Use the -w flag to perl.  It would have spotted
this problem:

    perl -we '$x = 1; $$y = 2; $x < $y && $x*4; print $x;'
    Useless use of multiplication in void context at -e line 1.
)

hth
tony
-- 
Tony Curtis, Systems Manager, VCPC,    | Tel +43 1 310 93 96 - 12; Fax - 13
Liechtensteinstrasse 22, A-1090 Wien.  | <URI:http://www.vcpc.univie.ac.at/>
"You see? You see? Your stupid minds!  | private email:
    Stupid! Stupid!" ~ Eros, Plan9 fOS.| <URI:mailto:tony_curtis32@hotmail.com>


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

Date: Mon, 15 Mar 1999 11:49:46 GMT
From: amdchips@rbetter.com (Intel no one)
Subject: Pentium III Chips Released with IDs - Intel won't budge
Message-Id: <36eff3d3.281855@news.earthlink.net>


	Pentium III chip with the individual serial number that can
track your web surfing and buying habits can now have the ID number
turned on and off by software.  Following some links I found the
www.fightdivx.com website and noticed that they have a Intel Boycott
page with links, quotes and info on why you should boycott the
invasion of privacy Pentium III chips. Just like everyone suspected,
the ID number can be taken without a customers knowledge. Just like
cellular phone fraud, once someone has your unique ID number, they
could pose as you on the internet.  Do not be fooled by reports that
this problem is fixed because Intel disabled this feature by software
on their up coming chips.  Information is power. They want to know
your surfing and buying habits. That is what this is all about. Here
is the link to the page with the boycott info and links. 

http://www.fightdivx.com/intelboycott.htm

Also you will find a Boycott Intel screen saver and banner on their
page above. Spread it around.





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

Date: Mon, 15 Mar 1999 08:50:52 -0500
From: "Allan M. Due" <Allan@due.net>
Subject: Re: Perl Keeps reading the A: drive
Message-Id: <7cj2qu$cht$1@camel21.mindspring.com>

gthia@rocketmail.com wrote in message <7ciet1$7l6$1@nnrp1.dejanews.com>...
:After creating a perl program and run it in
:Win95 (using Perl for Win32 Build 316),  my
:floppy drive keeps spinning first and then
:starts the normal execution of the perl program.
:Does anybody know why? Sort of irritating as the
:drive spining is quite noisy.


It is highly likely that you have virus checking software activated.  If you
want this behavior to cease, disable it while you are using perl.


:Please reply via email.


Just so you know, the norm for this newsgroup is post here, read here.  Of
course, you may never learn that if someone doesn't tell you <g> so I am
sending a copy via email as well.

HTH

AmD
--
$email{'Allan M. Due'} = ' All@n.Due.net ';
--random quote --
The beginning of wisdom is the definitions of terms.
 - Socrates





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

Date: Mon, 15 Mar 1999 12:47:04 +0100
From: Peter Field <peter.field@sh.bel.alcatel.be>
Subject: perl man page for DOS (big-perl)
Message-Id: <36ECF338.61054A4C@sh.bel.alcatel.be>

Hello,

I have installed perl for DOS ('big-perl') and have also downloaded man
pages for perl.
I also have 'pcman', unix man for DOS. How do I set-up man on DOS so
that I can read the perl man pages ?


With thanks,
Peter.


 
---------------------------------------
Peter Field
e-mail: fieldp@sh.bel.alcatel.be
---------------------------------------


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

Date: Mon, 15 Mar 1999 14:37:25 GMT
From: ancics@cibc.ca
Subject: Re: Perl, IIS, writing to network drives
Message-Id: <7cj5v4$r23$1@nnrp1.dejanews.com>



Ethan,

You make a good point re the usage of $year below.  It serves as a good
reminder to everyone of how not to use $year.  In retrospect, I should have
included a disclaimer to indicate that this script included dummy text/script
intended to illustrate the proposed use of the script only.  I agree that a
production script would have more robust code as you have indicated, as well
as error handling capabilities.  In the future, I will be sure to include
production quality script to avoid such confusion.


Regards,

Sandra Ancic

> [Posted and Emailed]  In article <7cb8tj$c4d$1@nnrp1.dejanews.com>,
> ancics@cibc.ca says...
> >
> ># For network drive
> >open (FEEDBACK,
> >">>\\\\servername\\sharename\\subdir\\ar$year-$yday.txt") || die
> >"Couldn't create file; $!\n";
>
> I haven't tried the UNC method, so I can't comment on this problem, but this
> next one will hurt pretty bad in about 9 months...
>
> >
> >print FEEDBACK "===Request - $month $mday,
> >19$year====================\n\n";
>
> No, No, No!  Do NOT prepend '19' to $year, ADD '1900' to $year, then use
> $year.  Your approach will yield the 'year' '19100' next year.  It is a bit
> silly (and potentially litigious) for us to be intentionally creating Y2K
> issues less than a year before 2000.
>
> --
> Ethan H. Poole              | Website Design and Hosting,
>                             | CGI Programming (Perl & C)..
> ========Personal=========== | ============================
> * ehpoole @ ingress . com * | --Interact2Day, Inc.--
>                             | http://www.interact2day.com/
>
>

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


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

Date: Mon, 15 Mar 1999 13:34:24 +0000
From: Andy Mendelsohn <andy@andymen.demon.co.uk>
To: John@melon17.freeserve.co.uk
Subject: Re: Scalar/array question
Message-Id: <36ED0C60.4BAE5745@andymen.demon.co.uk>

John wrote:
> 
> Just wondered if anyone knows
> how after i read a file into an
> array and then modify the elements
> so they are in double quotes?
> 
> Example :
> 
> line 1 of file is :
> Hello world
> Line 2:
> Hello again
> etc...
> 
> But i want then in the array as "Hello  world"
> and "Hello again" respectively.
> 
> John

take a look at perlfaq4 : 
'How do I process/modify each element of an array'


hth
andy


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

Date: Mon, 15 Mar 1999 03:04:54 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Scalar/array question
Message-Id: <6veic7.qt1.ln@magna.metronet.com>

John (kjc@nospam.co.uk) wrote:
: Just wondered if anyone knows
: how after i read a file into an
: array and then modify the elements
: so they are in double quotes?


foreach (@ra) {
   s/^/"/;
   s/$/"/;
}

or

foreach (@ra) {
   $_ = qq("$_");   # assuming no \n at end of each element
}


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


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

Date: Mon, 15 Mar 1999 12:41:10 +0000
From: Steve Wells <wells@cedarnet.org>
To: James Tolley <jamesht@idt.net>
Subject: Re: UNIQUE variable...
Message-Id: <36ECFFE6.143BFF3E@cedarnet.org>

James Tolley wrote:
> 
> > Many times I'm looking for a a situation where I need a unique variable.
> >
> > Such as I want to send out a cookie that is unique or have a unique
> > filename for caching etc.
> 
> I think you can be reasonably sure that:
> 
> $unique = $ENV{'REMOTE_ADDR'}.time.$$;
> 
> will work.

My ISP uses SQUID as a proxy server and my real address is
sent from squid as: $ENV{'HTTP_X_FORWARDED_FOR'} so you may
want to make unique:
$unique = (($ENV{HTTP_X_FORWARDED_FOR} ? 
                 $ENV{HTTP_X_FORWARDED_FOR} :
                 $ENV{REMOTE_ADDR}) . time . $$;

Great suggestion -- thanks.
STEVE
-- 
-----------
Stephen D. Wells
http://www.iren.net/wellss/


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

Date: Mon, 15 Mar 1999 13:29:56 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: UNIQUE variable...
Message-Id: <36ed09d4.501684@news.skynet.be>

Steve Wells wrote:

>I've been using: my $unique = $$.time 

Problems with this can happen if there are many small processes (over
65000) that quit within a second. In that case, you could end up with
the same $$ for another process, within the same second (same time()).

I expect that if you do a sleep(1) (or longer) that, at least, you keep
hold of this $$ for at least one second, so other processes doing the
same can NOT have the same process ID AND the same execution time, ever.

BTW what does this have to do with cookies?

	Bart.


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

Date: Mon, 15 Mar 1999 02:40:33 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: unlink a filename with spaces
Message-Id: <hhdic7.qt1.ln@magna.metronet.com>

aonghus.onia@ucg.ie wrote:

: is it possible to unlink a file with a name ($file) that contains spaces


   What happened when you tried it?


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


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

Date: Mon, 15 Mar 1999 14:17:10 +0100
From: Toggweiler Mike <ntogmi@abs.ascom.ch>
Subject: Re: Upload: 0 Bytes
Message-Id: <36ED0855.38BEE1F7@abs.ascom.ch>

This means, with IE you can't upload a file without this patch or Servis
pack?

remnants@my-dejanews.com wrote:

> As shipped, MSIE 3 & 4 do NOT support uploads via multipart/form-data
> form encoding, but Microsoft do offer patches to fix this in 3.02+.  For
> 3.02, you can find the patch at ...
>
>     http://mskyus.www.conxion.com/msdownload/ieinstall/en/rfc1867.exe
>
> For 4.0+, I believe the fix is in the first service pack.
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own



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

Date: Mon, 15 Mar 1999 06:38:11 -0600
From: Greg Forrest <forrestg@uregina.ca>
Subject: Using Select on STDIN ???
Message-Id: <36ECFF33.74BC5537@uregina.ca>

Hello,
I am sort of new to perl. I programmed an FTP server in Perl for Unix,
but now
I am trying my hand at Win32. The problem I am having is that I want to
use the
IO::Select module on STDIN so that the program will only stop to accept
the
users input when the user types. Here is a snippit of code:

#!/usr/local/bin/perl -w
require 5.002;
use strict;
use IO::Select;

my $ClientData = new IO::Select( *\STDIN );

    while( 1 )
    {
        # Do some other stuff and if there is input
            if( $ClientData->can_read )
            {
                my $DataToServer = <STDIN>;
                # take user input and do something with it
           }
    }

__END__

Any help will be appreciated (please email me directly).

Thanks,
Greg.



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

Date: 15 Mar 1999 12:07:41 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: viewing contents of *.html files
Message-Id: <921499932.579374@thrush.omix.com>

[posted & mailed]

Aaron Walker <amwalker@gate.net> wrote:
: I have a simple perl CGI script that views a file given in QUERY_STRING...
: for example: to view a file called /home/john/lala.txt, you would type in:
: http://servername/cgi-bin/viewfile.pl?file=/home/john/lala.txt

	FYI, this is (unless properly configured) a huge, gaping security
	hole, for a number of reasons.

: this is the source:
: --
: #!/usr/bin/perl
: require("cgi-lib.pl");

: print "Content-type: text/html\n\n";

: &ReadParse(*input);
: open(FILE, $input{'file'});
: @contents = <FILE>;
: close(FILE);

: print @contents;
: --

: now this works fine and dandy, unless the file I want to view is a html
: file.  I don't want to view the HTML itself, but rather the actual html
: source.  Is this possible to do?  If so, how?

	print "Content-type: text/html\n\n";
	print "<PRE>\n";

	open FILE, $input{'file'} or die $!;
	while (<FILE>) {
	    s/</&lt;/g;
	    s/>/&gt;/g;
	    print;
	}

	print "</PRE>\n";
	__END__

	HTH

-- 
-Zenin (zenin@archive.rhps.org)           From The Blue Camel we learn:
BSD:  A psychoactive drug, popular in the 80s, probably developed at UC
Berkeley or thereabouts.  Similar in many ways to the prescription-only
medication called "System V", but infinitely more useful. (Or, at least,
more fun.)  The full chemical name is "Berkeley Standard Distribution".


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

Date: Mon, 15 Mar 1999 07:05:29 -0500
From: "Jim Orona III" <JimOrona@ElegantSolutionsInc.com>
Subject: Re: Web mail reader?
Message-Id: <36ecf715$0$26213@mojo.crosslink.net>

I think I saw something like this on http://www.freshmeat.net

Search for "mail readers" and you should come up with something that will
help you out.

Jim Orona III

Marc Newman <mknewman@blkbox.com> wrote in message
news:921471104.214134@news.blkbox.com...
>Is there a PD web mail reader that anyone knows of?  POP3 and/or IMAP4.
>
>Marc
>
>--
>Marc K. Newman (N5SLG)    |Is UNIX pronounced "UNIQUES" or "EUNUCHS"?
>mknewman@blkbox.com       |281-480-2684 voice, 800-BLKBOX-1 toll free
>PO BOX 591822             |Serving the Houston Internet community since
1992
>Houston, Texas 77259-1822 |Email info@blkbox.com for 713/281/409 Internet!
>GB/CM/CS d H s+:+ g- p#2+ au+ a39 w+ v--- C++++ UBISC++++ P+ L- 3- E- N++ K
W M
>V po++ Y++ t++ 5+ jx R- G? tv+++ b+++ D- B--- e- u+ h---- f- r+++ n---
x++++




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

Date: Mon, 15 Mar 1999 09:17:23 -0500
From: Tom Kralidis <tom.kralidis@ccrsDotnrcandOtgc.ca>
Subject: Where to start with Perl
Message-Id: <36ED1673.29D50D@ccrsDotnrcandOtgc.ca>

Hi, 

At the risk of getting smart-alec replies, does anyone have any good
starting points for someone wanting to learn Perl.  I have a good handle
of UNIX (awk, grep, sed), some C/C++ and have heard nothing but good
things about Perl.  I would like to enhance my data manipulation
capabilities and productivity among other things.

Thanks in advance, 

 ..Tom
--------------------------------------------------------------------------------------------
Tom Kralidis				      			Canada Centre for Remote Sensing
Geo-Spatial Technologist		      			588 Booth Street , Room 241 
User Systems Development Section	      			Ottawa , Ontario K1A 0Y7
Data Acquisition Division		      			Tel: (613) 947-1828
mailto:tom.kralidis@ccrs.nrcan.gc.ca    			Fax: (613) 947-1408
	              
                              http://www.ccrs.nrcan.gc.ca
--------------------------------------------------------------------------------------------


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

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

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