[16747] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4159 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Aug 29 00:05:43 2000

Date: Mon, 28 Aug 2000 21:05:12 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <967521911-v9-i4159@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Mon, 28 Aug 2000     Volume: 9 Number: 4159

Today's topics:
    Re: AIX and IBM cc and gnu make to compile perl 5-6.0 <philipg@atl.mediaone.net>
    Re: braincramp question on parameters being entered int <stephenk@cc.gatech.edu>
    Re: braincramp question on parameters being entered int <philipg@atl.mediaone.net>
    Re: braincramp question on parameters being entered int <lauren_smith13@hotmail.com>
    Re: braincramp question on parameters being entered int <yosikim@lgeds.lg.co.kr>
    Re: braincramp question on parameters being entered int <carrotshoes@mail.rit.edu>
    Re: braincramp question on parameters being entered int <anmcguire@ce.mediaone.net>
        check and save random number (Todt68)
    Re: Get own machine's dial-up IP address? <rgparker@west.net>
    Re: Get own machine's dial-up IP address? <rgparker@west.net>
    Re: Get own machine's dial-up IP address? <bcaligari@shipreg.com>
    Re: How do I manipulate each element of an array? <lauren_smith13@hotmail.com>
    Re: How do I manipulate each element of an array? <bart.lateur@skynet.be>
    Re: How to create a simple backup program? (Homer Simpson)
    Re: How to encode for the web? <philipg@atl.mediaone.net>
    Re: MIME Mail help on NT - no sendmail! <tracyterrell@entersysgroup.com>
        perl send/detect ICMP <wschow@Comp.HKBU.Edu.HK>
    Re: perlcc - Compiler errors <wkempfer@lsil.com>
        Please, 2nd request for installation help ... <MENZpage@MENZpage.com>
    Re: Please, 2nd request for installation help ... <mikecook@cigarpool.com>
    Re: Problems with script to download a file <elephant@squirrelgroup.com>
    Re: Problems with script to download a file <bart.lateur@skynet.be>
    Re: Problems with script to download a file (Tony L. Svanstrom)
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Tue, 29 Aug 2000 01:17:32 GMT
From: "Philip Garrett" <philipg@atl.mediaone.net>
Subject: Re: AIX and IBM cc and gnu make to compile perl 5-6.0
Message-Id: <MaEq5.76219$rd1.13536911@typhoon-news1.southeast.rr.com>

Steven Rosenthal <sbr@columbia.edu> wrote in message
news:39ab0422.88293960@news.columbia.edu...
> Hi,
>  I've had exactly the same problems as were described below.  Were
> these problems ever resolved?  Has anyone successfully built Perl 5.6
> on AIX 4.3.2 using "IBM C for AIX"?  My IBM C compiler is vac.C
> 4.4.0.3.

I have successfully compiled 5.6 on AIX 4.3.2 and 4.3.3 with xlc, but I
don't remember what version the compiler was.  I think it was probably part
of the xlc.* lpp distribution, but I'm not sure.

> >I am having a difficult time compiling perl on my AIX 4.3.2.0 box
> >(workgroup server F40).  It stops on pp_sys.c and complains about two
> >different things from lines 4306-4648.  Here are examples of the two
> >messages:
> >
> >line 4306.14: 1506-068 (w) Operation between types "struct hostent*"
> >and "int" is not allowed.
> >
> >line 4338.21: 1506-285 (S) The indirection operator cannot be applied
> >to a pointer to an incomplete struct or union.
> >

It might not be the most graceful way to fix it, but you can probably kludge
this by changing line 4306 to:
hent = (struct hostent *)PerlSock_gethostbyname(POPpx);

hope it works,
Philip




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

Date: Mon, 28 Aug 2000 21:12:55 -0400
From: Stephen Kloder <stephenk@cc.gatech.edu>
Subject: Re: braincramp question on parameters being entered into a perl scrip
Message-Id: <39AB0E17.5C4DBDD@cc.gatech.edu>

Carrotshoes wrote:

> Hey all, I have a perl script that I want to take in some parameters at
> start up, I know that to get to the variables within the script its
>
> $foo = $_[x] etc .  I just can seem to get the script to see the variables
> from command line. Do I separate with commas, put it all in parenthesis or
> what.
> I'm running ActivePerl on a win98 box. Some sample code is below to clarify
> me.  Thanks for your help
>

Although @_ contains the parameters that a function is called with, @ARGV
contains the parameters that a script is called with.
perldoc perlvar


>
> #!/usr/bin/perl
> #get the parameters here
> $theDate  = $_[0];
> $header  = $_[1];
> $opening = $_[2];
> $entry  = $_[3];
> $closing = $_[4];
> #create the html file
>

In this case, you want to use $theDate  = $ARGV[0]; etc.

--
Stephen Kloder               |   "I say what it occurs to me to say.
stephenk@cc.gatech.edu       |      More I cannot say."
Phone 404-874-6584           |   -- The Man in the Shack
ICQ #65153895                |            be :- think.




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

Date: Tue, 29 Aug 2000 01:20:58 GMT
From: "Philip Garrett" <philipg@atl.mediaone.net>
Subject: Re: braincramp question on parameters being entered into a perl scrip
Message-Id: <_dEq5.76220$rd1.13539428@typhoon-news1.southeast.rr.com>

Carrotshoes <carrotshoes@mail.rit.edu> wrote in message
news:tqDq5.1609$%f1.40959@news1.news.adelphia.net...
> Hey all, I have a perl script that I want to take in some parameters at
> start up, I know that to get to the variables within the script its
>
> $foo = $_[x] etc .  I just can seem to get the script to see the variables
> from command line. Do I separate with commas, put it all in parenthesis or
> what.

The @_ array is for parameters to subroutines, not the main program itself.
To get the command-line parameters, use @ARGV.
perldoc perlvar

hth,
Philip




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

Date: Mon, 28 Aug 2000 18:06:20 -0700
From: "Lauren Smith" <lauren_smith13@hotmail.com>
Subject: Re: braincramp question on parameters being entered into a perl scrip
Message-Id: <8of26c$n81$1@brokaw.wa.com>


Carrotshoes <carrotshoes@mail.rit.edu> wrote in message
news:tqDq5.1609$%f1.40959@news1.news.adelphia.net...
> Hey all, I have a perl script that I want to take in some parameters at
> start up, I know that to get to the variables within the script its
>
> $foo = $_[x] etc .

Nope, that's not the way.

> I just can seem to get the script to see the variables
> from command line. Do I separate with commas, put it all in parenthesis or
> what.
>
>
> #!/usr/bin/perl
> #get the parameters here
> $theDate  = $_[0];
> $header  = $_[1];
> $opening = $_[2];
> $entry  = $_[3];
> $closing = $_[4];
> #create the html file
>
> open (OUT, ">$theDate.html")
>  || warn "Couldn't open file";
>
> all my variables have no value when printed out later. thanks again

You want to know more about the @ARGV variables.  I refer you to the perlvar
documentation.

perldoc perlvar

or alternatively,

Start->Programs->ActivePerl->Online Documentation->perlvar (it's about 10%
down the left frame)

Lauren
--
print grep ord $_,map{y/a-zA-Z//d;$x.="+ $_";chr(eval $x)}
'J74u43-s2tA1-84n33o45th1er5-12-P3e13-82r48l21H13-a6-76
c40k25er2wx8-y6z13-81'=~m#([^!\n]{3})#g#tr/-0-9//d;print





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

Date: Tue, 29 Aug 2000 10:57:04 +0900
From: Yongsik Kim <yosikim@lgeds.lg.co.kr>
Subject: Re: braincramp question on parameters being entered into a perl scrip
Message-Id: <39AB1870.251EFCA9@lgeds.lg.co.kr>



Carrotshoes wrote:
> 
> Hey all, I have a perl script that I want to take in some parameters at
> start up, I know that to get to the variables within the script its
> 
> $foo = $_[x] etc .  I just can seem to get the script to see the variables
> from command line. Do I separate with commas, put it all in parenthesis or
> what.
separate with space or tab

> I'm running ActivePerl on a win98 box. Some sample code is below to clarify
> me.  Thanks for your help
> 
> #!/usr/bin/perl
> #get the parameters here
> $theDate  = $_[0];
> $header  = $_[1];
> $opening = $_[2];
> $entry  = $_[3];
> $closing = $_[4];
$theDate  = $ARGV[0];
$header  = $ARGV[1];
$opening = $ARGV[2];
$entry  = $ARGV[3];
$closing = $ARGV[4];

> #create the html file
> 
> open (OUT, ">$theDate.html")
>  || warn "Couldn't open file";
> 
> all my variables have no value when printed out later. thanks again
> 
> Don
> carrotshoes@mail.rit.edu


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

Date: Tue, 29 Aug 2000 02:01:01 GMT
From: "Carrotshoes" <carrotshoes@mail.rit.edu>
Subject: Re: braincramp question on parameters being entered into a perl scrip
Message-Id: <xPEq5.1620$%f1.41902@news1.news.adelphia.net>

Thanks for all the info folks. I appreciate it.  Guess that whole "perl
community for help" schtick isn't just pleasant talk :) Enjoy your evenings

Don


Carrotshoes <carrotshoes@mail.rit.edu> wrote in message
news:tqDq5.1609$%f1.40959@news1.news.adelphia.net...
> Hey all, I have a perl script that I want to take in some parameters at
> start up, I know that to get to the variables within the script its
>
> $foo = $_[x] etc .  I just can seem to get the script to see the variables
> from command line. Do I separate with commas, put it all in parenthesis or
> what.
> I'm running ActivePerl on a win98 box. Some sample code is below to
clarify
> me.  Thanks for your help
>
>
> #!/usr/bin/perl
> #get the parameters here
> $theDate  = $_[0];
> $header  = $_[1];
> $opening = $_[2];
> $entry  = $_[3];
> $closing = $_[4];
> #create the html file
>
> open (OUT, ">$theDate.html")
>  || warn "Couldn't open file";
>
> all my variables have no value when printed out later. thanks again
>
> Don
> carrotshoes@mail.rit.edu
>
>




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

Date: Mon, 28 Aug 2000 20:48:48 -0500
From: "Andrew N. McGuire " <anmcguire@ce.mediaone.net>
Subject: Re: braincramp question on parameters being entered into a perl scrip
Message-Id: <Pine.LNX.4.21.0008282038080.1874-100000@hawk.ce.mediaone.net>

On Tue, 29 Aug 2000, Carrotshoes quoth:

~~ Date: Tue, 29 Aug 2000 00:26:01 GMT
~~ From: Carrotshoes <carrotshoes@mail.rit.edu>
~~ Newsgroups: comp.lang.perl.misc
~~ Subject: braincramp question on parameters being entered into a perl
~~     scrip
~~ 
~~ Hey all, I have a perl script that I want to take in some parameters at
~~ start up, I know that to get to the variables within the script its
~~ 
~~ $foo = $_[x] etc .  I just can seem to get the script to see the variables
~~ from command line. Do I separate with commas, put it all in parenthesis or
~~ what.
~~ I'm running ActivePerl on a win98 box. Some sample code is below to clarify
~~ me.  Thanks for your help
~~ 
~~ 
~~ #!/usr/bin/perl
~~ #get the parameters here
~~ $theDate  = $_[0];

[ snip rest of script ]

  If I understand correctly, you are trying to get command line
arguments 'into' a script, meaning parse them.  The problem here
is that you are using the syntax $_[0] to mean "the first command
line argument", but that is not correct.  What you are looking for
is the array @ARGV, in which each argument is stored as a scalar
value.  To reference the first command line argument use $ARGV[0],
as in:

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

print "$ARGV[0]\n";

This small script will print the first command line argument it
is passed.  In this case, the script is entirely devoid of error
checking, I did not check for the existence of $ARGV[0], just
printed it, defined or not.  You may want to 'perldoc perlvar'
to read more about it.

anm
-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~ Andrew N. McGuire                                                      ~
~ anmcguire@ce.mediaone.net                                              ~
~ "Plan to throw one away; you will, anyhow." - Frederick P. Brooks, Jr. ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



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

Date: 29 Aug 2000 04:04:48 GMT
From: todt68@aol.com (Todt68)
Subject: check and save random number
Message-Id: <20000829000448.10567.00000578@ng-bh1.aol.com>

I'm try to make a program that will make a random number.
Then check a file to see if number is in that file. If number is in file then
remake another random number and check again. If number isn't in file then save
number in that file. And save number in another file.

So far I have

code:
--------------------------------------------------------------------------
------


#!/usr/bin/perl
my ($found, @values, @match);

open (DB, "<random_master.txt") or die "Unable to open.";
$found = 0;
LINE: while (<DB>) {
(/^#/) and next LINE;
(/^\s*$/) and next LINE;
chomp; 
@values = &split_decode($_);

NUMBER:
$found = 0;
$b = 0;
@array=(1..10);
range 1 to 9 random number
$random = $array[rand @array];
$b = "$random";

if ($values[$num] eq $b) {
push @match,$_; 
$found++; 
print "no more numbers available \n";
goto NUMBER ;
} # end of if

} # end of while

close DB;
goto NUMBER if $values[$num] eq $b;


# If no matching record found, save number in both files
if ($found < 1) {
open(USER, ">>random_user.txt") or die "can't open USER \n"; 
print USER "$b\n";
close (USER);
# append to master file
open(MASTER, ">>random_master.txt") or die "can't open MASTER \n"; 
print MASTER "$b\n";
close (MASTER);
print "\n";
print $b;
print "\n";

exit;
} # end of if

print "\n";
print "\n";

sub split_decode {
# --------------------------------------------------------
# Takes one line of the database as input and returns an
# array of all the values. It replaces special mark up that 
# join_encode makes such as replacing the '``' symbol with a 
# newline and the '~~' symbol with a database delimeter.
$db_delim = '|';

my ($input) = shift; 
my (@array) = split (/\Q$db_delim\E/o, $input, $#db_cols+1);
foreach (@array) {
s/~~/$db_delim/g; # Retrieve Delimiter..
s/``/\n/g; # Change '' back to newlines..
} 
return @array;
}




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

so far it almost works. However when its suppose to remake random number
because of a duplicate - it doesn't.

Any help pointing me in the right direction would be GREATLY appreciated.





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

Date: Tue, 29 Aug 2000 02:33:48 GMT
From: Randall Parker <rgparker@west.net>
Subject: Re: Get own machine's dial-up IP address?
Message-Id: <MPG.1414c1f43124c2bd9898f3@news.onlynews.com>

Yes, but I want to get that info while in Perl. I'd like to do it thru 
standard function calls.

The idea is that I would not be at that machine to type the ipconfig 
command. But I could have a script running there to send myself the info. 
The problem is figuring out that info from within that script.

On Tue, 29 Aug 2000 00:03:19 +0200 esteemed Brendon Caligari did'st hold 
forth thusly:
> at the win2000 console, if i type 'ipconfig', i get a
> clear picture of what IPs my machine talks on.  If I wanted
> to know what IP I have been assigned I could...say..send that
> information to the office email address (if all one needs to
> know is what IP his home pc is on so that he could upload all
> the downloaded mp3s onto his home computer).
> 


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

Date: Tue, 29 Aug 2000 02:39:51 GMT
From: Randall Parker <rgparker@west.net>
Subject: Re: Get own machine's dial-up IP address?
Message-Id: <MPG.1414c382bd8fb40d9898f4@news.onlynews.com>

John,

I guess I don't see how this helps. 

1) The home machine has a dynamic IP address and therefore I can't 
remotely call up a web page that it serves up.

2) Not all operating systems define these environment variables.
   And what is REMOTE_ADDR? The address that this machine uses when it 
talks to the rest of the world on the public internet?

3) How can the dial-up machine fetching this response from a different 
machine help any? I want to get dial-up machine's address and send it to 
my office machine. 

On Mon, 28 Aug 2000 22:36:33 GMT esteemed john did'st hold forth thusly:
> I wrote a small perl script that sits on a server somewhere.
> All it does is echo the REMOTE_ADDR & REMOTE_HOST environment variables.
> On UNIX like systems they are different.
> I call it 'remote address echo' for want of a better name.
> http://www.acgnj.org/cgi-bin/rae.pl
> 
> Then I run a perl script on the dial-up machine to fetch this response (LWP
> works fine for me), parse it, get the IP and URL, build a HTML page with the
> new data, date and time, and FTP it to some personal private place on the
> web. I figure about every 15min. is often enough.
> 
> BTW: go direct not through a proxy, otherwise you get the address of the
> proxy not your box.
> 


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

Date: Tue, 29 Aug 2000 03:12:56 GMT
From: Brendon Caligari <bcaligari@shipreg.com>
To: rgparker@west.net
Subject: Re: Get own machine's dial-up IP address?
Message-Id: <8of9na$tmq$1@nnrp1.deja.com>

In article <MPG.1414c1f43124c2bd9898f3@news.onlynews.com>,
  Randall Parker <rgparker@west.net> wrote:
> Yes, but I want to get that info while in Perl. I'd like to do it
thru
> standard function calls.

I'm clueless...

>
> The idea is that I would not be at that machine to type the ipconfig
> command. But I could have a script running there to send myself the
info.

hmm...one way would be to 'execute' ipconfig and capture the output in
an array:

# run ipconfig from within script
my @ipconfig = `ipconfig`;

# print list of IP Addresses
print(grep(/IP Address/, @ipconfig));

Brendon


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Mon, 28 Aug 2000 17:56:27 -0700
From: "Lauren Smith" <lauren_smith13@hotmail.com>
Subject: Re: How do I manipulate each element of an array?
Message-Id: <8of1js$n06$1@brokaw.wa.com>


Larry Rosler <lr@hpl.hp.com> wrote in message
news:MPG.14145ef54ce6173098ace8@nntp.hpl.hp.com...
>
>   y===c or$_='&nbsp;'for@array;

y===c ?

*scratch* *scratch*  What the hell??...

perldoc perlop

Aha!  That's just evil, man.

Lauren
--
print grep ord $_,map{y/a-zA-Z//d;$x.="+ $_";chr(eval $x)}
'J74u43-s2tA1-84n33o45th1er5-12-P3e13-82r48l21H13-a6-76
c55k10e13wx0-13za1bc3-68'=~m#([^!\n]{3})#g#tr/-0-9//d;print




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

Date: Tue, 29 Aug 2000 01:23:55 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: How do I manipulate each element of an array?
Message-Id: <224mqs09ssjsbbp3n2itsktqc1gi1knrjs@4ax.com>

Lauren Smith wrote:

>>   y===c or$_='&nbsp;'for@array;
>
>y===c ?
>
>*scratch* *scratch*  What the hell??...
>
>perldoc perlop
>
>Aha!  That's just evil, man.

I still didn't get it until I let B::Deparse loose on it.

Funny enough, this module gave me a few warnings about uninitialized
values. Oops!

Use of uninitialized value in string eq at
D:/programs/indigoperl/lib/B/Deparse.pm line 2670.
Use of uninitialized value in pattern match (m//) at
D:/programs/indigoperl/lib/B/Deparse.pm line 2436.
Use of uninitialized value in concatenation (.) at
D:/programs/indigoperl/lib/B/Deparse.pm line 2436.

-- 
	Bart.


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

Date: 29 Aug 2000 02:35:54 GMT
From: homer.simpson@springfield.nul (Homer Simpson)
Subject: Re: How to create a simple backup program?
Message-Id: <8of7ia$suj$0@216.39.131.146>

-- Well first you wouldn't use Perl.
Windows still includes the old standby batch language and xcopy which was 
written to do just what you describe.

from a command prompt type xcopy /? for help.


Alternatively you can use the backup program that comes with Windows 9x to do 
the same...



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

Date: Tue, 29 Aug 2000 01:33:51 GMT
From: "Philip Garrett" <philipg@atl.mediaone.net>
Subject: Re: How to encode for the web?
Message-Id: <3qEq5.76226$rd1.13546907@typhoon-news1.southeast.rr.com>

Christian Mahnke <mahnke@uni-freiburg.de> wrote in message
news:8oer8k$dmd$1@n.ruf.uni-freiburg.de...
> Is there a manual way to encode non-alphanumeric characters, described in
2?
> So far I came up with
> $number = "+";
> unpack ("C", $number);
> $number = sprintf "%lx", $number;

Easier yet:
use CGI;
$encoded_string = CGI::escape($plain_string);

> But this works only for one digit. What to do with a string like that:
> $string = qq {
> <form method=get action="http://www.skyways.de/cgi/favail"
> target="_blank"><input type="image" name=submit
> src="/Grafiken/pruef-buttton.gif" Border=0><input type=hidden name=args
> value="0~~1~Frankfurt~New+York~2451808~2451822"><input type=hidden
name=adt
> value="1"><input type=hidden name=chd value="0"><input type=hidden
name=inf
> value="0"><input type=hidden name=flight value="FRA|NYC|670|131.90"><input
> type=hidden value="Verfügbarkeit" name="FRA|NYC|670|131.90"></form>
> };

Why do you want to encode this?  Are you going to append it to a URL?  If
you want to encode HTML entities (&amp, etc.), you can do this:
use CGI::Util;
$encoded_string = CGI::Util::simple_escape('&');

perldoc CGI

hth,
Philip




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

Date: Tue, 29 Aug 2000 03:14:02 GMT
From: "Tracy Terrell" <tracyterrell@entersysgroup.com>
Subject: Re: MIME Mail help on NT - no sendmail!
Message-Id: <_TFq5.21222$C5.364609@typhoon.austin.rr.com>

> > > Hey folks, here is an easy one (I bet) ...
> > >
> > > # I'm looking for a "MailTools" replacement for this block.....
> > > open MAIL, "| /usr/lib/sendmail -t -i" or die "open: $!";
> > > $top->print(\*MAIL);
> > > close MAIL;
> >
> > Install one of the windows ports of sendmail?
> >
> > Wyzelli
> >
>
> Well, I'm sure that would work, but I'm already using MailTools to send
"no
> attachment" emails in other scripts and would like to stick to one
mechanism
> for sending mail (to the degree that it still makes sense...) - if for no
> other reason than to keep overall maintenance straightforward.  Thanks for
> the suggesstion.
>
> T
>
>

Okay, I spent many frustrated hours a day trying to implement a suggestion
from a pal in the group (sorry, can't find his suggestion in the thread) to
"stringify" a MIME Entity for printing through the MailTools module.  My
goal is just to send a "vanilla" mail with a ASCII file attachment.  I can't
help but think that I am *really* close here - what confuses me is no matter
WHAT tweaks I make, the attachment either doesn't show up at all, or shows
up INLINE instead of as a true attachment (yeah, I'm using Outlook...) -
help this poor humbled soul.

Thanks,
Tracy

use Mail::Mailer;
use MIME::Entity;

my $smtphost = "mailman.domain.com";
my $mailer = Mail::Mailer->new("smtp", $smtphost);

my %hdrs =(
  'From'     => 'me@domain.com',          # must be valid Notes Mail...
  'To'       => 'you@domain.com',
  'Subject'  => 'Test Mime',
);

$mailer->open(\%hdrs);

my $top = build MIME::Entity( Type        => 'multipart/mixed');

$top->attach (Path        => './short.txt',
              Filename    => 'short.txt',
              Disposition => 'attachment');

my $a = $top->stringify_header;

print $mailer $a;

Mail::Mailer::close($mailer);

THE RESULT IS A MAIL LIKE THIS ("blah" is the content of the attachment
'short.txt'):

Content-Type: multipart/mixed; boundary="----------=_967518619-518-0"
Mime-Version: 1.0
X-Mailer: MIME-tools 4.104 (Entity 4.117)

This is a multi-part message in MIME format...

------------=_967518619-518-0
Content-Type: text/plain; name="short.txt"
Content-Disposition: attachment; filename="short.txt"

blah
------------=_967518619-518-0--




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

Date: 29 Aug 2000 19:21:10 GMT
From: "Mr. Chow Wing Siu" <wschow@Comp.HKBU.Edu.HK>
Subject: perl send/detect ICMP
Message-Id: <8oh2f6$ekm$1@net44p.hkbu.edu.hk>

Hi,

I would like to get the examples to send and read/detect ICMP
messages by perl.

Thanks for help.

--
Johnson Chow


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

Date: Mon, 28 Aug 2000 14:50:40 -0700
From: Wes Kempfer <wkempfer@lsil.com>
Subject: Re: perlcc - Compiler errors
Message-Id: <39AADEB0.21877D88@lsil.com>


This reference is undefined when trying to use the 5.6.0 version of perlcc under
Solaris 2.6 also. I've only been able to compile successfully with the -b
(bytecode) option.


>
> /tmp/ccuWYZpi.o(.text+0x9b10d): undefined reference to `boot_DynaLoader'



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

Date: Mon, 28 Aug 2000 18:27:20 -0700
From: "MENZpage.com" <MENZpage@MENZpage.com>
Subject: Please, 2nd request for installation help ...
Message-Id: <39ab1218$1@newsserver1.intergate.ca>

Hi,

Problem:  Getting my .pl scripts to function properly using my local MS PWS
server.

This is my second request for some suggestions as my first posting didn't
yield any :|  I hope somebody will help me this time :)

I recently had need to reinstall Perl on my computer to update some code.  I
used to successfully run Perl scripts on my system a year ago, so I'm not a
complete newbie, but this time I haven't been able to get it to work right.

I must be missing some thing really obvious, but I guess I need someone to
point it out to me.  Here is what I have and what I have done so far to get
it working:

I have:

Windows 98
MS Personal Web Server (PWS)
ActiveState ActivePerl (most current version)
MS Internet Explorer 5

I have done the following:

Installed the latest version of Microsoft Windows Installer 1.1+  and DCOM
as required by the ActiveState install.
Installed the latest version of ActiveState's ActivePerl.
Added c:/perl/bin/ to my autoexec.bat
Edited my registry to include:
    HKEY_LOCAL_MACHINE ->
        System ->
            CurrentControlSet ->
                Services ->
                    w3svc ->
                        parameters ->
                            Script Map ->
                                .pl ->
                                    c:\perl\bin\perl.exe %s %s

I've created a virtual directory called "cgi_bin" for my physical "cgi-bin"
directory and have given it "Execute" and "Scripts" access (I've tried one,
the other, and both)

Here's my problem:

I  can test my .pl scripts from the DOS command prompt successfully.  I can
upload my .pl scripts to a server and have them test successfully in a
browser.  So, I'm confident that my scripts are good.  However, I can't seem
to get them to test successfully in my browser using my local MS PWS server
as I used to do before.  I keep getting a "HTTP 500 - Internal server
error".

Please, can anyone offer any suggestions as to what I might be doing wrong.

I sincerely appreciate you help.

Menz








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

Date: Mon, 28 Aug 2000 19:28:40 -0700
From: "Michael Cook" <mikecook@cigarpool.com>
Subject: Re: Please, 2nd request for installation help ...
Message-Id: <ydFq5.892$Z83.399909@news.uswest.net>

Did you have PWS running on port 80 before you installed ActiveState?
    Michael

"MENZpage.com" <MENZpage@MENZpage.com> wrote in message
news:39ab1218$1@newsserver1.intergate.ca...
> Hi,
>
> Problem:  Getting my .pl scripts to function properly using my local MS
PWS
> server.
>
> This is my second request for some suggestions as my first posting didn't
> yield any :|  I hope somebody will help me this time :)
>
> I recently had need to reinstall Perl on my computer to update some code.
I
> used to successfully run Perl scripts on my system a year ago, so I'm not
a
> complete newbie, but this time I haven't been able to get it to work
right.
>
> I must be missing some thing really obvious, but I guess I need someone to
> point it out to me.  Here is what I have and what I have done so far to
get
> it working:
>
> I have:
>
> Windows 98
> MS Personal Web Server (PWS)
> ActiveState ActivePerl (most current version)
> MS Internet Explorer 5
>
> I have done the following:
>
> Installed the latest version of Microsoft Windows Installer 1.1+  and DCOM
> as required by the ActiveState install.
> Installed the latest version of ActiveState's ActivePerl.
> Added c:/perl/bin/ to my autoexec.bat
> Edited my registry to include:
>     HKEY_LOCAL_MACHINE ->
>         System ->
>             CurrentControlSet ->
>                 Services ->
>                     w3svc ->
>                         parameters ->
>                             Script Map ->
>                                 .pl ->
>                                     c:\perl\bin\perl.exe %s %s
>
> I've created a virtual directory called "cgi_bin" for my physical
"cgi-bin"
> directory and have given it "Execute" and "Scripts" access (I've tried
one,
> the other, and both)
>
> Here's my problem:
>
> I  can test my .pl scripts from the DOS command prompt successfully.  I
can
> upload my .pl scripts to a server and have them test successfully in a
> browser.  So, I'm confident that my scripts are good.  However, I can't
seem
> to get them to test successfully in my browser using my local MS PWS
server
> as I used to do before.  I keep getting a "HTTP 500 - Internal server
> error".
>
> Please, can anyone offer any suggestions as to what I might be doing
wrong.
>
> I sincerely appreciate you help.
>
> Menz
>
>
>
>
>
>




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

Date: Tue, 29 Aug 2000 01:10:21 GMT
From: jason <elephant@squirrelgroup.com>
Subject: Re: Problems with script to download a file
Message-Id: <MPG.1415aaf2496b2e0898971c@localhost>

Tony L. Svanstrom <tony@svanstrom.com> wrote ..
>jason <elephant@squirrelgroup.com> wrote:
>
>> J. Cooper <jcoop@interlog.com> wrote ..
>
>> ><a href="../cgi-bin/dl_file.pl">Download Proceedings</a>
>> >
>> >The actual script is:
>> >
>> >#!/usr/bin/perl
>> ># dl_file.pl : simple cgi file download
>> >use CGI;
>> >print "content-type: application/*\n\n";
>> >$DLFILE="../cgi-bin/Symposium2000Proceedings.pdf";
>> >open(DLFILE, $DLFILE) || die "Can not open $DLFILE: $!\n";
>> >while(read DLFILE, $buffer, 256)
>> >{
>> >   print $buffer;
>> >}
>> >close (DLFILE);
>> >exit; 
>> >
>> >What happens is that the dialog box appears, asking if user wants to
>> >save file to disk, or run from current location.  This is what I want
>> >to happen.  Unfortunately, the wrong file is downloaded.  The
>> >dl_file.pl is downloaded instead of the symposium2000proceedings.pdf.
>> >Anyone have any ideas as to what is going wrong?
>> 
>> yes .. your web server is misconfigured .. contact your server 
>> administrator - or ask in a forum that relates to your web server
>
>That's just BS, the one downloading sends a request for dl_file.pl and
>therefore it's that name that shows.

yes .. of course .. thank you for your (impassioned) correction

for the originator .. the correct file is being downloaded - but it's 
called dl_file.pl because that's what the browser thinks that it is

I'm not sure of whether there is a solution to this .. perhaps there's 
an HTTP header that allows you to override the name of the file

-- 
  jason -- elephant@squirrelgroup.com --


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

Date: Tue, 29 Aug 2000 01:30:41 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: Problems with script to download a file
Message-Id: <3g4mqs8i1ui5os3rlp1hl6pspu9g2gghlh@4ax.com>

J. Cooper wrote:

>$DLFILE="../cgi-bin/Symposium2000Proceedings.pdf";

You don't need that. You're in the same directory.

>open(DLFILE, $DLFILE) || die "Can not open $DLFILE: $!\n";
>while(read DLFILE, $buffer, 256)
>{
>   print $buffer;
>}
>close (DLFILE);
>exit; 

Don't forget binmode on DLFILE and STDOUT.

>What happens is that the dialog box appears, asking if user wants to
>save file to disk, or run from current location.  This is what I want
>to happen.  Unfortunately, the wrong file is downloaded.  The
>dl_file.pl is downloaded instead of the symposium2000proceedings.pdf.

You're talking about the contents, not the filename? Are you sure the
script is even *executed*?

-- 
	Bart.


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

Date: Tue, 29 Aug 2000 05:27:50 +0200
From: tony@svanstrom.com (Tony L. Svanstrom)
Subject: Re: Problems with script to download a file
Message-Id: <1eg41dt.m2bvivvmteb2N%tony@svanstrom.com>

        [Followup-To: comp.infosystems.www.authoring.cgi]

jason <elephant@squirrelgroup.com> wrote:

> Tony L. Svanstrom <tony@svanstrom.com> wrote ..
> >jason <elephant@squirrelgroup.com> wrote:

> >> yes .. your web server is misconfigured .. contact your server 
> >> administrator - or ask in a forum that relates to your web server
> >
> >That's just BS, the one downloading sends a request for dl_file.pl and
> >therefore it's that name that shows.
> 
> yes .. of course .. thank you for your (impassioned) correction
> 
> for the originator .. the correct file is being downloaded - but it's
> called dl_file.pl because that's what the browser thinks that it is
> 
> I'm not sure of whether there is a solution to this .. perhaps there's
> an HTTP header that allows you to override the name of the file

A solution there is, and to get it the question should be asked in
comp.infosystems.www.authoring.cgi


     /Tony
-- 
     /\___/\ Who would you like to read your messages today? /\___/\
     \_@ @_/  Protect your privacy:  <http://www.pgpi.com/>  \_@ @_/
 --oOO-(_)-OOo---------------------------------------------oOO-(_)-OOo--
   on the verge of frenzy - i think my mask of sanity is about to slip
 ---ôôô---ôôô-----------------------------------------------ôôô---ôôô---
    \O/   \O/  ©99-00 <http://www.svanstrom.com/?ref=news>  \O/   \O/


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

Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 16 Sep 99)
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.  

| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.

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 V9 Issue 4159
**************************************


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