[17190] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4602 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Oct 13 00:05:33 2000

Date: Thu, 12 Oct 2000 21:05:08 -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: <971409908-v9-i4602@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Thu, 12 Oct 2000     Volume: 9 Number: 4602

Today's topics:
    Re: [ Wildly OT ] Re: Japanese Girl Has PERL Request. (Logan Shaw)
        [Off Topic] Re: Can Perl or another language... (Gwyn Judd)
        about sendmail <wstsoi@hongkong.com>
    Re: about sendmail (Gwyn Judd)
    Re: about sendmail (Logan Shaw)
    Re: Asyncronous Queue (Logan Shaw)
        Can Perl or another language... aaaaa@aaabaaa.aaa
    Re: CGI.pm and Tables question (David Efflandt)
        Difference between '=' and '.=' operators (Sean McAfee)
    Re: Insecure $ENV{PATH} while running setuid (David Efflandt)
    Re: ip under win9x/2k from the commandline? <elephant@squirrelgroup.com>
    Re: ip under win9x/2k from the commandline? <elephant@squirrelgroup.com>
    Re: ip under win9x/2k from the commandline? (Gwyn Judd)
    Re: Multiple CGI objects (David Efflandt)
    Re: Newbie: Debugger error <bwalton@rochester.rr.com>
    Re: newbie: pws and active perl <elephant@squirrelgroup.com>
    Re: Perl/Windows problem <wyzelli@yahoo.com>
    Re: Perl/Windows problem <godzilla@stomp.stomp.tokyo>
    Re: Perl/Windows problem <frank@the.real.frank.com>
    Re: Server Side Includes (David Efflandt)
    Re: Uploading files using perl scrip - via e-mail (David Efflandt)
    Re: Works on Win2000 but not on Win98!? Why? Help! <wyzelli@yahoo.com>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: 12 Oct 2000 21:49:10 -0500
From: logan@cs.utexas.edu (Logan Shaw)
Subject: Re: [ Wildly OT ] Re: Japanese Girl Has PERL Request.
Message-Id: <8s5t76$6ns$1@provolone.cs.utexas.edu>

In article <39E6417B.C4BF612E@vpservices.com>,
Jeff Zucker  <jeff@vpservices.com> wrote:
>I was making a reference about the time a few years back when the ACLU
>defended the right of the Ku Klux Klan (a group of racist *#*holes) to
>march in Skokie, Il.  It wasn't a funny event.  I know people who
>supported ACLU and others who went to Skokie to heckle the Klan and some
>who did both. (no smilie)

Why am I reminded of a scene from the movie "The Blues Brothers"?
(Yes, I know it wasn't the same group, but same idea.)

  - Logan


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

Date: Fri, 13 Oct 2000 03:53:47 GMT
From: tjla@guvfybir.qlaqaf.bet (Gwyn Judd)
Subject: [Off Topic] Re: Can Perl or another language...
Message-Id: <slrn8ud1q8.huk.tjla@thislove.dyndns.org>

I was shocked! How could aaaaa@aaabaaa.aaa <aaaaa@aaabaaa.aaa>
say such a terrible thing:
>I want to "steal" information from a redirection script.  When i connect
>(LWP) to the script.pl i get back all the information from the page it
>redirected me to but how can i find out which url it redirected me to?

I have no idea. I was just wondering what the point was of having a
Reply-To: address that is spam-proofed?

-- 
Gwyn Judd (print `echo 'tjla@guvfybir.qlaqaf.bet' | rot13`)
Concept, n.:
	Any "idea" for which an outside consultant billed you more than
$25,000.


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

Date: Fri, 13 Oct 2000 11:43:57 +0800
From: "Lucas Gamp" <wstsoi@hongkong.com>
Subject: about sendmail
Message-Id: <8s60oc$3g2$1@horn.hk.diyixian.com>

Hi all,

I used to send email in CGI by /usr/sbin/sendmail, but this time
I must send a HTML that contains images, so how should I deal
with the images, how to print to sendmail?

Thanks very very much.








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

Date: Fri, 13 Oct 2000 03:50:57 GMT
From: tjla@guvfybir.qlaqaf.bet (Gwyn Judd)
Subject: Re: about sendmail
Message-Id: <slrn8ud1kt.huk.tjla@thislove.dyndns.org>

I was shocked! How could Lucas Gamp <wstsoi@hongkong.com>
say such a terrible thing:
>Hi all,
>
>I used to send email in CGI by /usr/sbin/sendmail, but this time
>I must send a HTML that contains images, so how should I deal
>with the images, how to print to sendmail?

I would definitely use the MIME::Lite module.

Hope that helps.

-- 
Gwyn Judd (print `echo 'tjla@guvfybir.qlaqaf.bet' | rot13`)
Q:	How was Thomas J. Watson buried?
A:	9 edge down.


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

Date: 12 Oct 2000 23:02:39 -0500
From: logan@cs.utexas.edu (Logan Shaw)
Subject: Re: about sendmail
Message-Id: <8s61gv$747$1@provolone.cs.utexas.edu>

In article <slrn8ud1kt.huk.tjla@thislove.dyndns.org>,
Gwyn Judd <tjla@guvfybir.qlaqaf.bet> wrote:
>I was shocked! How could Lucas Gamp <wstsoi@hongkong.com>
>say such a terrible thing:
>>Hi all,
>>
>>I used to send email in CGI by /usr/sbin/sendmail, but this time
>>I must send a HTML that contains images, so how should I deal
>>with the images, how to print to sendmail?
>
>I would definitely use the MIME::Lite module.

I wouldn't, since the goal is to send "HTML that contains images".
Since this is impossible[1], using MIME::Lite would really be more
effort than necessary.

I say it's impossible because, while HTML can refer to images and while
an e-mail message can contain both images and HTML, HTML is a markup
language, not a way of transferring graphics.  Furthermore, as far as I
know, there is no URL type that refers to othre attachments within a
MIME message.  If there were, one could send an e-mail with images
attached that were referred to by an HTML file that was also attached,
which would be very close to sending a web page by e-mail.

Of course, in many cases, people *want* to just send links rather than
images in the e-mail, so they can customize the URL for each message
and thereby know that you received it successfully when you try to open
the e-mail, and thereby know that your e-mail address works.

  - Logan

[1]  It's not really impossible; see http://www.illuminated.co.uk/gif2html/ .


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

Date: 12 Oct 2000 22:08:21 -0500
From: logan@cs.utexas.edu (Logan Shaw)
Subject: Re: Asyncronous Queue
Message-Id: <8s5ub5$6sd$1@provolone.cs.utexas.edu>

In article <39E618A5.57762350@algx.net>, Matt Pavlovich  <mpav@algx.net> wrote:
>My goal is to be
>able to queue up jobs and wait until resources become available
>(previous processes finish, thus freeing used resources), and then run
>the queued jobs.
>
>I would also like to be able to add jobs while the queue is running.
>
>Originally, I was going to use a pair of daemons.  The first accepting
>multiple connections, and checking configuration data for accuracy, then
>sending the data to the queue daemon (accepts only one connection) to
>insert the job into the queue.
>
>This design isn't working as I keep stumbling to find a way to keep the
>queue processing while accepting new jobs at the same time.

One approach is to have the executing daemon (wow, that sounds
sinister) connect to the other daemon periodically (perhaps after jobs
finish) and collect new jobs, rather than the other way around.  Yes,
you're polling this way, but when the workload is high it doesn't
matter since you're only checking when jobs are finishing.

Another approach is to just store the queue on disk.  It may not be the
best for performance, but it's easy and it works.

Still another method, which I think provides the ideal functionality
but which is difficult to implement, is to have a master queue process
to manage all the work; it accepts all connections -- both from
processes that are are seeking to have work done and those that are
seeking to do it.

This, again, sounds like polling rather than interrupt-driven update of
the queue, but it's not if you use a trick.  Have the process that runs
the jobs connect to the queue managing process and send some sort of
message saying "please give me work to do", and then block waiting for
a reply.  If the queue manager process has work available, it can
return it immediately.  If not, it will simply make a note that the
process on the other end of the connection has asked for work but
hasn't been given any, and when new work arrives, it can be sent out
through the socket.

Of course, then there is the issue of how to get that queue-managing
process to talk to several simultaneous connections at once.  The only
feasible Perl solution as far as I know is to use select() (or the
fancier IO::Select).  This can be done, but it's a bit of a pain.  I
once tried to implement this, and although I got an early prototype
working, I ended up practically having to write a cooperative
multitasking task switcher like thing to make it happen.

Well, I hope that gives you some ideas.  I'd be very interested if
anyone has better ideas.  I have thought about a similar problem quite
a lot and that's the best I came up with.

  - Logan


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

Date: Thu, 12 Oct 2000 23:37:09 -0400
From: aaaaa@aaabaaa.aaa
Subject: Can Perl or another language...
Message-Id: <39E68365.3E6AA254@aaabaaa.aaa>

I want to "steal" information from a redirection script.  When i connect
(LWP) to the script.pl i get back all the information from the page it
redirected me to but how can i find out which url it redirected me to?




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

Date: Fri, 13 Oct 2000 02:11:03 +0000 (UTC)
From: efflandt@efflandt.xnet.com (David Efflandt)
Subject: Re: CGI.pm and Tables question
Message-Id: <slrn8ucrqr.73o.efflandt@efflandt.xnet.com>

On Fri, 06 Oct 2000 20:46:29 -0700, Jeff Zucker <jeff@vpservices.com> wrote:
>Kurt Wagner wrote:
>> 
>> Is there a way to format the contents of only a few cells in a row of
>> a table?  I would like to change the background of a cell, but have
>> the other cells in the same row unaffected.
>> 
>> For example I use:
>> 
>> td({-bgcolor=>red},['cell1text', 'cell2text'])
>> 
>> but that changes the background color for the whole row.  Is there any
>> way to change it for only certain cells?
>
>    table( 
>        Tr( {-bgcolor=>'blue'},
>        [
>           th({-bgcolor=>'red'},'red'),
>           th({-bgcolor=>'white'},'white'),
>           th('blue')
>        ])
>    )

That will not work for cells in a row.  For the same row, append td or th
for each cell that is different with a dot (.) instead of comma, like for
a table with 3 columns:

    table(
        Tr( {-bgcolor=>'blue'},
        [
           th([{-colspan=>3},'3 columns']),	# comma
           td([{-bgcolor=>'red'},'red']).	# dot (next on same row)
             td([{-bgcolor=>'white'},'white']).	# dot (next on same row)
             td(['blue']),	# comma (next on next row)
           td(['col 1','col 2','col 3'])
        ])
    )

It took me some trial and error to figure this out since perldoc CGI does
not explain tables and only has a brief example.

-- 
David Efflandt  efflandt@xnet.com  http://www.de-srv.com/
http://www.autox.chicago.il.us/  http://www.berniesfloral.net/
http://cgi-help.virtualave.net/  http://hammer.prohosting.com/~cgi-wiz/


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

Date: Fri, 13 Oct 2000 02:11:47 GMT
From: mcafee@waits.facilities.med.umich.edu (Sean McAfee)
Subject: Difference between '=' and '.=' operators
Message-Id: <DbuF5.6780$O5.143808@news.itd.umich.edu>

Some code I'm writing accumulates key-value pairs in a hash.  There can be
multiple values for a single key, but rather than use an array reference
for the hash value I'm using a single scalar with the multiple values
separated by newline characters.  My original implementation looked like
this:

while (($key, $value) = some_func()) {
    exists $hash{$key} ? ($hash{$key} .= "\n$value") : ($hash{$key} = $value);
}

While sufficient, it always seemed that a more Perlish way to write the
algorithm should be possible.  Yesterday, I thought I had found it:

while (($key, $value) = some_func()) {
    ($hash{$key} .= exists $hash{$key} && "\n") .= $value;
}

I was surprised to find that this code didn't behave as I expected; the
exists $hash{$key} expression always evaluated to true, so that after the
loop completed every hash value had a "\n" prepended.  Somehow the .=
operator causes $hash{$key} to spring into existence before the right-hand
side is evaluated.  This doesn't happen with the = operator, though:

perl -le '$a{foo} = exists $a{foo} && "bar"; print $a{foo}'

 ...prints nothing, as expected.  Even this prints nothing:

perl -le '$a{foo} = $a{foo} . (exists $a{foo} && "bar"); print $a{foo}'

So does anyone know why .= is so different?

Since none of my $value scalars are undef, I can get my second code snippet
above to do what I want by using defined() instead of exists(), but I'm
still curious about .='s screwy behavior.

-- 
Sean McAfee                                                mcafee@umich.edu
print eval eval eval eval eval eval eval eval eval eval eval eval eval eval
q!q@q#q$q%q^q&q*q-q=q+q|q~q:q? Just Another Perl Hacker ?:~|+=-*&^%$#@!


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

Date: Fri, 13 Oct 2000 02:26:23 +0000 (UTC)
From: efflandt@efflandt.xnet.com (David Efflandt)
Subject: Re: Insecure $ENV{PATH} while running setuid
Message-Id: <slrn8ucsnk.73o.efflandt@efflandt.xnet.com>

On Wed, 11 Oct 2000 00:20:32 +0800, Beggar <cpegbeggar@mail.com> wrote:
>I get this messsage when I try to run a program
>having the suid bit set.
>
>How to solve the problem ? is that need to disable some
>security check first??  I really need to do so.
>Thanks for any help!!
>
>please reply to "cpegbeggar@mail.com"

You have to untaint your PATH (and all user input).
On a system with Perl type:  perldoc perlsec

-- 
David Efflandt  efflandt@xnet.com  http://www.de-srv.com/
http://www.autox.chicago.il.us/  http://www.berniesfloral.net/
http://cgi-help.virtualave.net/  http://hammer.prohosting.com/~cgi-wiz/


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

Date: Fri, 13 Oct 2000 12:41:20 +1000
From: jason <elephant@squirrelgroup.com>
Subject: Re: ip under win9x/2k from the commandline?
Message-Id: <MPG.1451215973533dcb98981a@localhost>

Steven M. O'Neill wrote ..
>Werner, Wolfgang <zakazan@gmx.de> wrote:
>>jason wrote:
>>
>>> Werner, Wolfgang wrote ..
>>> >how can i find ount my ip using the windows commandline and perl?
>>>
>>>   perl -MSocket -e"print inet_ntoa inet_aton $ENV{COMPUTERNAME}"
>
>>hi jason,
>>nope, seems not to work on my machine.
>>any idea?
>>thakns for your time anyway :)
>
>perl -e "system (ipconfig)"

are you sure that's available on Win9x ? .. I thought it was only on NT

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


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

Date: Fri, 13 Oct 2000 12:44:31 +1000
From: jason <elephant@squirrelgroup.com>
Subject: Re: ip under win9x/2k from the commandline?
Message-Id: <MPG.1451221b135d241b98981b@localhost>

Larry Rosler wrote ..
>[Rearranged for logical flow, and signature clipped, in accordance with 
>the conventions of this and most other newsgroups.]
>
>In article <39E587FE.A4682572@gmx.de> on Thu, 12 Oct 2000 11:44:30 
>+0200, Werner, Wolfgang <zakazan@gmx.de> says...
>> jason wrote:
>> 
>> > Werner, Wolfgang wrote ..
>> > >how can i find ount my ip using the windows commandline and perl?
>> >
>> >   perl -MSocket -e"print inet_ntoa inet_aton $ENV{COMPUTERNAME}"
>> >
>> hi jason,
>> nope, seems not to work on my machine.
>> any idea?
>> thakns for your time anyway :)
>
>perlfaq9: "How do I find out my hostname/domainname/IP address?"

excellent

to Wolfgang - the problem was probably that Win9x doesn't have the 
COMPUTERNAME env var defined .. which Larry's pointer will help you 
solve (and in a platform independent way)

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


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

Date: Fri, 13 Oct 2000 01:53:02 GMT
From: tjla@guvfybir.qlaqaf.bet (Gwyn Judd)
Subject: Re: ip under win9x/2k from the commandline?
Message-Id: <slrn8ucqnr.h6i.tjla@thislove.dyndns.org>

I was shocked! How could Steven M. O'Neill <steveo@panix.com>
say such a terrible thing:

>perl -e "system (ipconfig)"

Doesn't this win a "Useless use of perl" award?

-- 
Gwyn Judd (print `echo 'tjla@guvfybir.qlaqaf.bet' | rot13`)
Troglodytism does not necessarily imply a low cultural level.


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

Date: Fri, 13 Oct 2000 02:52:29 +0000 (UTC)
From: efflandt@efflandt.xnet.com (David Efflandt)
Subject: Re: Multiple CGI objects
Message-Id: <slrn8ucu8h.73o.efflandt@efflandt.xnet.com>

On Tue, 10 Oct 2000, rbfitzpa@my-deja.com <rbfitzpa@my-deja.com> wrote:
>Can someone give me a brief explanation to why someone would need
>multiple CGI objects in one perl script? I'm sure there are some good
>reasons why but up till now I've always been able to accomplish what I
>needed to without multiple CGI's. I want to make sure I'm not missing
>out on anything.

I use multiple CGI objects when I want to read in and sort (or randomize)
multiple records from the simple CGI.pm database method.  Data is saved
url-encoded, so you don't have to worry about newlines or your separator
being included in the content like you would with a flat file.  For
example a list of links or ftp sites with multiple fields:

# Read records into @q list
open(IN,"$file") || &errmsg($file,$!);
$i = 0;
while (!eof(IN)) {
    $q[$i++] = new CGI(IN);
}
close IN;

-- 
David Efflandt  efflandt@xnet.com  http://www.de-srv.com/
http://www.autox.chicago.il.us/  http://www.berniesfloral.net/
http://cgi-help.virtualave.net/  http://hammer.prohosting.com/~cgi-wiz/


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

Date: Fri, 13 Oct 2000 01:56:45 GMT
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: Newbie: Debugger error
Message-Id: <39E66BDA.C9C63BCD@rochester.rr.com>

Ana Dominguez wrote:
 ...
> I am just trying my "hello world" program in my Unix environment.
> 
> If I run the Perl script from the debugger with the -d option, I get an
> error as shown below. If I don't include the -d option, the program just
> prints the phrase I requested. What is the difference here? I have a
> couple of other small programs that I have run just by calling the
> script name at the prompt and it gets executed, however, if I run it
> from the debugger, I get even syntax errors. I believe I am totally
> misunderstanding something here but need some help.
> 
> Also, if I try to do a use lib "/usr/local/lib/", I get an error from
> the compiler.
> 
> Any pointers will be greatly appreciated.
> 
> The program:
> $ more hello.pl
> #!/usr/local/bin/perl -w
> print ("Hello, world!\n");
> 
> Execution:
> $ perl hello.pl
> Hello, world!
> 
> No execution due to error:
> $ perl -d hello.pl
> Can't locate perldb.pl in @INC.
> 
> Execution:
> $ hello.pl
> Hello, world!
> 
> --
> Ana

I think you have an improperly or incompletely installed copy of Perl. 
If you have a sysadmin, ask him or her to reinstall Perl; if you
installed it yourself, try again, and be sure the "make install" goes to
completion without error.  You probably need to be root to properly do
the make install.  It could be that you have just a copy of the Perl
executable, and the various libraries are not installed, or not
installed in a fashion such that they are findable by Perl.
-- 
Bob Walton


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

Date: Fri, 13 Oct 2000 12:16:28 +1000
From: jason <elephant@squirrelgroup.com>
Subject: Re: newbie: pws and active perl
Message-Id: <MPG.14511b88714cbed989819@localhost>

Pieter Overbeeke wrote ..
>On Wed, 11 Oct 2000 15:09:57 +1000, jason <elephant@squirrelgroup.com>
>wrote:
>
>>Pieter Overbeeke wrote ..
>>>Hi all, 
>>>
>>>I'm trying to get cgi (perl) scripts working on pws but i'm bot being
>>>very succesfull yet. So i hope someone can help me.
>>>
>>>I am running pws on win98. I have installed activeperl, set the
>>>mimetypes right, in the registry, in
>>>HKEY_LOCAL_MACHINE/System/CurrentControlSet/Services/w3svc/parameters/Script
>>>Map i have added .pl .cgi and .plx which refer to c:/perl/bin/perl.exe
>>>%s %s (also tried c:/perl/bin/perl5.6.0.exe %s %s).
>>
>>c:/perl/bin/perl.exe is not a valid Windows path .. while you can use 
>>forward slashes in native Perl functions - you cannot use them in 
>>everything related to Perl
>>
>>c:\perl\bin\perl.exe is a valid Windows path .. if it's also the path to 
>>your perl.exe then that might solve your problem
>>
>>btw .. if you install ActivePerl *after* installing PWS then it should 
>>add the appropriate script mappings for you
-
>I have improved but it is still not working. What happens now is when
>i try to activate a perlscript in my browser like:
>http://ns/cgi-bin/xxx.pl  is that my browser asks me if i would like
>to open the file or if i would like to download it! When i choose
>open, a dosbox appears and it seems that the script is executed in
>that box, but no html appears in my browser like it is supposed to do.
>(I've tested the script on the server of my host-provider and it
>works...)
>So maybe this gives you a better idea of what i am doing wrong.

that's still a script mapping issue .. either the .pl extension is not 
correctly mapped or/and the /cgi-bin directory is not correctly setup - 
and so the SERVER tries to send the file to the browser rather than 
executing the file as it should

this is really not a Perl issue .. you should consult your PWS 
documentation for how to set up script mappings and how to set up 
virtual directories

hint: the problem is *probably* that the script mapping is set up for 
the server - but not for the /cgi-bin virtual directory itself .. you 
may need to do this manually from the PWS administration tool

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


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

Date: Fri, 13 Oct 2000 10:38:18 +0930
From: "Wyzelli" <wyzelli@yahoo.com>
Subject: Re: Perl/Windows problem
Message-Id: <0dtF5.11$ME4.2982@vic.nntp.telstra.net>

"Godzilla!" <godzilla@stomp.stomp.tokyo> wrote in message
news:39E656F7.FFC937FA@stomp.stomp.tokyo...
>
> Really burnt you on that one, yes Frank?
>

Frank?  Frankly No.

Wyzelli
--
($a,$b,$w,$t)=(' bottle',' of beer',' on the wall','Take one down, pass
it around');
for(reverse(1..100)){$s=($_!=1)?'s':'';$c.="$_$a$s$b$w\n$_$a$s$b\n$t\n";
$_--;$s=($_!=1)?'s':'';$c.="$_$a$s$b$w\n\n";}print"$c*hic*";





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

Date: Thu, 12 Oct 2000 18:27:19 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Perl/Windows problem
Message-Id: <39E664F7.7DB9C2C8@stomp.stomp.tokyo>

Wyzelli wrote:
 
> Godzilla! wrote:


(Wyzelli snipped references to his copying my code)
(then rewording my code and claiming it as his own)


> > Really burnt you on that one, yes Frank?

> Frank?  Frankly No.
 
> Wyzelli



Then I will burn you again to remind you to
stop harassing me under myriad fake names,
lest I set your mind on fire with humilation,
which I have, so many times over the years.

"Add a path statement to your autoexec.bat as appropriate
 for accessing your Perl setup. Associate .ATT with your
 Perl setup using Window's carry over from powerful 
 Win 3.x's File Mangler...."

"...as appropriate for...Perl setup...."

This is not your "Perl" as stated by you.
However, your article is a plagiarized and
modified version of my own article.

As a longtime, well seasoned and exceptionally well
learned educator, based on reading your articles,
regardless of which fake name you choose, based on
dealing with you for years, I am placing your average
writing skills, your average reading comprehension
skills along with your average intellectual level,
all as being quite relative to a stereotypical 
high school dropout.


* blows smoke off her smoldering fingers *

Godzilla!


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

Date: 13 Oct 2000 02:15:31 GMT
From: "Frank" <frank@the.real.frank.com>
Subject: Re: Perl/Windows problem
Message-Id: <8s5r83$r2b$0@206.230.71.57>

John Clifford Williams <cliffwilliams@eurobell.co.uk> wrote in message
news:8s526g$1cjv$1@slrn.eurobell.net...
> I've written a Perl script which is desgned to accept a .ATT file (email
> attachment) as its input. I've been trying to set it up so that
> double-clicking an ATT file's icon runs the script which in turn loads the
> ATT file for processing, but Windows doesn't seem to like it when I try to
> associate the .ATT file type with my script. Does anyone know how to do
> this, or a way round it?

As you didn't give a heck of a lot of info, the obvious answer is that the
problem is at line 17 of your script. It is staring you in the face, man!
:-)

But, on the more practical side, it is very easy to associate a file type
with a Perl /SCRIPT/ (not just Perl, Godzilla darln).

1) Create your perl script, and make it accept the filename to process from
$ARGV[0]
2) Create a batch file somewhere on your hd that looks like this:

    @perl \path\to\your\script.pl "%1"^Z

Where the ^Z is CTRL-Z (press CTRL-Z at the same time.)

3) Press Start -> Run, type "winfile", press Enter. Find a ATT file on your
hd somewhere and click on it (just once, not double click). Then click on
the File Menu, click "Associate...", and in the "Associate With:" box, type
the path your your /batch/ file, not your script. For example, i stored my
test batch file in "echo.bat" an "c:\echo.bat". So i just typed in the
"associate with" box, "c:\echo.bat" and pressed OK.

Now that should be all you need to do. I hope that helped some!

hth,

Frank

--
perl -e 'print "Frank is another perl hacker."'






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

Date: Fri, 13 Oct 2000 03:06:41 +0000 (UTC)
From: efflandt@efflandt.xnet.com (David Efflandt)
Subject: Re: Server Side Includes
Message-Id: <slrn8ucv36.73o.efflandt@efflandt.xnet.com>

On Sun, 08 Oct 2000, jtjohnston <jtjohnston@courrier.usherb.ca> wrote:
>This is interesting. Yahoo does this with server side:
>
><script language=javascript
>src="http://ss.webring.yahoo.com/navbar?f=j&y=eslcafe2&u=97051503810017724"></script>
>
>My server doesn't have SSI. Is there a way to emulate it?

Yes with CGI if you can do that.  But I fail to see any Perl question?

-- 
David Efflandt  efflandt@xnet.com  http://www.de-srv.com/
http://www.autox.chicago.il.us/  http://www.berniesfloral.net/
http://cgi-help.virtualave.net/  http://hammer.prohosting.com/~cgi-wiz/


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

Date: Fri, 13 Oct 2000 03:13:04 +0000 (UTC)
From: efflandt@efflandt.xnet.com (David Efflandt)
Subject: Re: Uploading files using perl scrip - via e-mail
Message-Id: <slrn8ucvf5.73o.efflandt@efflandt.xnet.com>

On Sat, 7 Oct 2000 11:15:06 +0100, Brendon <brendonm@lineone.net> wrote:
>Hi. To anyone who can help, or if you've had a similar problem:
>
>I have created a form with a file field. The script is supposed to attach
>the file and send it via e-mail to my e-mail address.

Use MIME::Lite, but you might need to install it yourself.  It works well
with CGI.pm to e-mail uploads as attachments.

-- 
David Efflandt  efflandt@xnet.com  http://www.de-srv.com/
http://www.autox.chicago.il.us/  http://www.berniesfloral.net/
http://cgi-help.virtualave.net/  http://hammer.prohosting.com/~cgi-wiz/


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

Date: Fri, 13 Oct 2000 11:34:30 +0930
From: "Wyzelli" <wyzelli@yahoo.com>
Subject: Re: Works on Win2000 but not on Win98!? Why? Help!
Message-Id: <I1uF5.13$ME4.2917@vic.nntp.telstra.net>

"Larry Rosler" <lr@hpl.hp.com> wrote in message
news:MPG.144ff3e0997bccfd98ae32@nntp.hpl.hp.com...
>
> That produces a warning when you try to chomp the undef that comes
back
> at end-of-file.  So drop it from your bag of tricks.
>

Thanks for that... consider it dropped!

Wyzelli

--
($a,$b,$w,$t)=(' bottle',' of beer',' on the wall','Take one down, pass
it around');
for(reverse(1..100)){$s=($_!=1)?'s':'';$c.="$_$a$s$b$w\n$_$a$s$b\n$t\n";
$_--;$s=($_!=1)?'s':'';$c.="$_$a$s$b$w\n\n";}print"$c*hic*";





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

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


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