[12149] in Perl-Users-Digest
Perl-Users Digest, Issue: 5749 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat May 22 00:07:26 1999
Date: Fri, 21 May 99 21:00:15 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Fri, 21 May 1999 Volume: 8 Number: 5749
Today's topics:
CGI.pm & popup_menu() <unclelui@grin.net>
Confusion about subroutines <JFedor@datacom-css.com>
dbcgi and Progress Database <nvieira@saopaulo.sgi.com>
Re: dbcgi and Progress Database <bill@fccj.org>
Re: Dereferencing a filehandle. <rick.delaney@home.com>
Re: How to check for ASCII? (Larry Rosler)
Re: interaktiv perl, list perl variables <rick.delaney@home.com>
Re: MacPerl and QuarkXPress??? <bill@fccj.org>
Re: Perl "constructors" <nick@perlfect.com>
Re: Perl "constructors" (Kai Henningsen)
Re: Perl "constructors" (Alan Curry)
Re: Perl "constructors" armchair@my-dejanews.com
Re: PERLFUNC: ref - find out the type of thing being re <rick.delaney@home.com>
Remove line from big flatfile? (Ken Williams)
Re: Remove line from big flatfile? <tchrist@mox.perl.com>
Uploading file with Information with Perl has an unreso (Ryan Ngi)
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 21 May 1999 19:44:10 -0700
From: "Luis F. Salas" <unclelui@grin.net>
Subject: CGI.pm & popup_menu()
Message-Id: <374619FA.5517@grin.net>
Hola,
I have written a script that generates a form if no data is supplied,
and displays the data entered when the form is properly filled in.
I am using CGI.pm
My question is:
If I want a selection to be the default, does it have to be the first
one
in line? For instance, if I want Information Systems to be the default
entry, does it have to be at the beginning of the list? I know that
works, but is it the only way? What if we want to keep the list in
alphabetic order? What would be the equivalent of HTML's SELECT (or
CHECKED) using CGI.pm?
CGI.pm
======
Tr(td(
['Department:', popup_menu('department',
[''Accounting','Administration','Human Resources',
'Information Systems', 'Programming']),
HTML: (notice the SELECTED on I.S.)
====
<TR>
<TD>Department:
</TD>
<TD><SELECT NAME="department" SIZE=1>
<OPTION VALUE="Accounting">Accounting
<OPTION VALUE="Administration">Administration
<OPTION VALUE="Human Resources">Human Resources
<OPTION VALUE="Information Systems" SELECTED>Information Systems
<OPTION VALUE="Programming">Programming
</SELECT>
</TD>
I would appreciate any help.
In case you feel like taking a look to the script in action use "guest"
for both password and login at
http://heretic.mcs.csuhayward.edu/~lsalas/cgi-bin/workorder.pl
Thanks!
Luis
unclelui@grin.net
------------------------------
Date: Sat, 22 May 1999 00:09:41 -0400
From: "Jody Fedor" <JFedor@datacom-css.com>
Subject: Confusion about subroutines
Message-Id: <7i5926$9up$1@plonk.apk.net>
Before I get hammered....
I've done the perldoc -q subroutines and looked this up in "Perl
Programming".
I just dont get this TYPEGLOB thing.
I'm trying to pass a filename to a subroutine. It says you're supposed to
do something like this:
&Template($in{template});
sub Template {
local(*FILE); <-- I would assume here that the variable located in
$in{template} is passed to the subroutine and is now located in $FILE?? or
am I way out there?
open (FILE,"$FILE") || die "Cannot open template file $FILE\n";
while (<FILE>){
$HTML =$_;
}
close(FILE);
$HTML =~s/\$(\w+)/${$1}/g;
return $HTML;
}
I know what I want, I just dont know how to do it.
TIA
------------------------------
Date: Fri, 21 May 1999 23:15:15 -0200
From: "Newton Vieira Jr." <nvieira@saopaulo.sgi.com>
Subject: dbcgi and Progress Database
Message-Id: <37460523.21B59ED3@saopaulo.sgi.com>
Hello,
Anybody worked with dbcgi and progress database, i'm trying to compile
this lib and got a problem saying "you cannot precompile SQL requests
with this module (319)"
Thanks
Newton
--
------------------------------
Date: Fri, 21 May 1999 22:54:07 -0400
From: "Bill Jones" <bill@fccj.org>
Subject: Re: dbcgi and Progress Database
Message-Id: <37461c0f.0@usenet.fccj.cc.fl.us>
[Posted and Mailed]
----------
In article <37460523.21B59ED3@saopaulo.sgi.com>, "Newton Vieira Jr."
<nvieira@saopaulo.sgi.com> wrote:
> Hello,
>
>
> Anybody worked with dbcgi and progress database, i'm trying to compile
> this lib and got a problem saying "you cannot precompile SQL requests
> with this module (319)"
>
> Thanks
>
> Newton
What version of Progress are you using? I am not familar
with dbcgi - is that a Perl module or a Progress HLI/C
3GL Interface gateway extension?
Curious,
-Sneex- :]
______________________________________________________________________
Bill Jones Data Security Specialist http://www.fccj.org/cgi/mail?dss
______________________________________________________________________
We are the CLPM... Lower your standards and surrender your code...
We will add your biological and technological distinctiveness to
our own... Your thoughts will adapt to service us...
...Resistance is futile...
Jacksonville Perl Mongers
http://jacksonville.pm.org
jax@jacksonville.pm.org
------------------------------
Date: Sat, 22 May 1999 02:33:11 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: Dereferencing a filehandle.
Message-Id: <3746170D.A6B1DC1B@home.com>
[posted & mailed]
Larry Rosler wrote:
>
> use vars '$fh';
> $fh = '/path/to/file';
> open $fh or die $!;
^^^
fh
> print "$fh: $_\n";
Let's reread that again. :-)
> open FILEHANDLE,EXPR
> open FILEHANDLE
>
> Opens the file whose filename is given by EXPR, and associates it with
> FILEHANDLE. If FILEHANDLE is an expression, its value is used as the
> name of the real filehandle wanted. If EXPR is omitted, the scalar
> variable of the same name as the FILEHANDLE contains the filename.
^^^^^^^^^^^^^^^^
In this case, using fh as the filehandle (with no expr) will cause open
to look for the file name in $fh. Of course, now you might want to use
an uppercase name to silence 'Unquoted string' warnings.
use strict;
use vars '$FH';
$FH = $0;
open FH or die $!;
print $FH, $_ while <FH>;
The way you have it above, FILEHANDLE is an expression--$fh--and since
EXPR is missing, the filename is looked up in the scalar variable
sharing the name of the *value* of $fh. In this case
${'/path/to/file'}.
use strict qw/subs vars/;
use vars '$FH';
$FH = $0;
${$0} = $FH;
open $FH or die $!;
print $FH, $_ while <$FH>;
--
Rick Delaney
rick.delaney@home.com
------------------------------
Date: Fri, 21 May 1999 17:48:54 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: How to check for ASCII?
Message-Id: <MPG.11af9ed43b143be0989ae2@nntp.hpl.hp.com>
[Posted and a courtesy copy mailed.]
In article <3745E915.28518DD3@email.sps.mot.com> on Fri, 21 May 1999
16:15:55 -0700, Mike Garcia <rp5280@email.sps.mot.com> says...
> I'm developing a program and there is a check I need to do for a non
> numeric value on a variable. Is there an easy way to do this in Perl 5?
Your question isn't quite clear in view of your Subject. Perhaps the
answer is found in perlfaq4: "How do I determine whether a scalar is a
number/whole/integer/float?"
> Please email me at rp5280@email.sps.mot.com
Sure, as you didn't munge your e-mail address.
> Mike
> begin: vcard
> ...
But please don't pollute your posts with this crap in the future.
--
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Sat, 22 May 1999 03:20:13 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: interaktiv perl, list perl variables
Message-Id: <3746220E.B432C347@home.com>
[posted & mailed]
Daniel Heiserer wrote:
>
> Hi,
> I would like to have an interaktiv perl-shell. :-))
>
> does something like this already exist?
> Probably yes, but where?
perldoc perlfaq3
Is there a Perl shell?
[snip]
> 1) if eval fails I would like to have a message like:
> "error in parsing $_"
> currently he says nothing
eval $_;
warn "error in parsing $_:\n$@" if $@;
perldoc -f eval
> 2) How can I list my variables and their representation:
> I can use "print" if I know that this variable exists, but if
> I don't know that it exists?
Sounds like what you really want is the Perl debugger.
perldoc perldebug
--
Rick Delaney
rick.delaney@home.com
------------------------------
Date: Fri, 21 May 1999 22:50:55 -0400
From: "Bill Jones" <bill@fccj.org>
Subject: Re: MacPerl and QuarkXPress???
Message-Id: <37461b4f.0@usenet.fccj.cc.fl.us>
[Posted and Mailed]
----------
In article <3745545B.95698573@falukuriren.se>, Mats Pettersson
<mats.pettersson@falukuriren.se> wrote:
> Hi!
>
> I'm currently trying to do a apple-script for QuarkXPress. However
> expressions isn't apple-scripts greatest strength, so i thought i should
> try MacPerl.
>
> I couldn't find any info how to intergrate apple-script with perl or if
> it is possible in any way.
>
> Anybody tried scripting Quark with perl, or if somone could point me to
> any similar information.
>
> Thank's
>
> Mats
Hmmm, thbat funny; did you download the latest MacPerl version?
There is a 'almost' complete write-up on Apple-centric stuff -
including AppleScript.
Look for macperl.pod, et al, in the 'pod' directory; or
better yet, start MacPerl and look under Help for Mac specific
features - in there you will see things like:
MacPerl::DoAppleScript(SCRIPT)
Execute an AppleScript script.
Example:
MacPerl::DoAppleScript(<<END_SCRIPT);
tell application "MacPerl"
make new Window
copy "Inserting text the hard way." to character 1 of front Window
end tell
END_SCRIPT
HTH,
-Sneex- :]
______________________________________________________________________
Bill Jones Data Security Specialist http://www.fccj.org/cgi/mail?dss
______________________________________________________________________
We are the CLPM... Lower your standards and surrender your code...
We will add your biological and technological distinctiveness to
our own... Your thoughts will adapt to service us...
...Resistance is futile...
Jacksonville Perl Mongers
http://jacksonville.pm.org
jax@jacksonville.pm.org
------------------------------
Date: Sat, 22 May 1999 01:05:54 +0000
From: Nick Moraitakis <nick@perlfect.com>
Subject: Re: Perl "constructors"
Message-Id: <374602F2.C997082@perlfect.com>
> You have gained special status in the kill-files and filters of the
> majority of the frequent posters to this group meaning that your
> trolling will not be seen by those people.
>
> I do hope that everyone will follow suit.
What is the point of participating in a public discussion
when you're not ready to hear out other people speaking
publically? Whether you like what they say or not is *your*
problem, not everybody else's. I'm tired of seeing people
threatening others that they will killfile them, and boast
about putting someone in their killfile. Shut your ears and
close your eyes... cry to mommy.. Man, if you can't take
people speaking themselves in public, then maybe public
newsgroups are not for you.
Furthermore if you want to apply filters to what you read,
nobody stops you from doing so, but why do you feel the need
to announce it? Why do you think the rest of us care? As if
it's relevant to the topic of discussion in the newsgroup...
--
Nick Moraitakis
------------------------------
Date: 22 May 1999 00:12:00 +0200
From: kaih=7HNxq-11w-B@khms.westfalen.de (Kai Henningsen)
Subject: Re: Perl "constructors"
Message-Id: <7HNxq-11w-B@khms.westfalen.de>
pacman@defiant.cqc.com (Alan Curry) wrote on 17.05.99 in <oiJ%2.7880$LP2.159246@news6.ispnews.com>:
> Would you use perl if it died every time a fork() failed with EAGAIN?
Certainly. fork() failing with EAGAIN is a fairly catastrophic situation
on any machine I've used Perl on, and retrying is almost certainly making
it worse.
> Would you use perl if it died every time a bind() failed with EADDRINUSE?
I haven't seen this one before except in case of pilot error. And whenever
I have seen it, continuing was not a reasonable option.
> Would you use perl if it died every time an open() failed with ENFILE?
Maybe. 99% of my open()s do a die() on any error anyway. The few remaining
cases, I could certainly -e before.
> Why then do you tolerate a language that dies whenever a brk() fails with
> ENOMEM?
Because, in *all* cases I have seen where brk() failed, that was the only
sensible action available. If a program already uses about 90% of my
RAM+swap, retrying isn't going to help.
>These are all _temporary_ failures,
Actally, 99% of the time, they are fatal failures, not temporary at all.
Kai
--
http://www.westfalen.de/private/khms/
"... by God I *KNOW* what this network is for, and you can't have it."
- Russ Allbery (rra@stanford.edu)
------------------------------
Date: Sat, 22 May 1999 01:42:34 GMT
From: pacman@defiant.cqc.com (Alan Curry)
Subject: Re: Perl "constructors"
Message-Id: <eYn13.3304$Ie1.100992@news14.ispnews.com>
In article <7HNxq-11w-B@khms.westfalen.de>,
Kai Henningsen <kaih=7HNxq-11w-B@khms.westfalen.de> wrote:
>> Why then do you tolerate a language that dies whenever a brk() fails with
>> ENOMEM?
>
>Because, in *all* cases I have seen where brk() failed, that was the only
>sensible action available. If a program already uses about 90% of my
>RAM+swap, retrying isn't going to help.
>
>>These are all _temporary_ failures,
>
>Actally, 99% of the time, they are fatal failures, not temporary at all.
On a machine where your perl script is the only thing running, maybe. But on
real computers, there are other processes running. When one gets an ENOMEM,
the others are likely to get ENOMEMs of their own pretty soon. If they are C
programs written by a competent progammer, then each process will make its
own decision what to do about the failure. Lots of things can and should exit
when memory is low. By doing so, they make room for the more important
processes, which can then retry and succeed, and continue doing what they're
supposed to do.
If the important processes are written in perl, they die and the sysadmin
must be woken up to come in and clean up the mess. This is the bad thing
about perl. It increases the "annoy-the-sysadmin" ratio by voluntarily
killing itself because of temporary error.
--
Alan Curry |Declaration of | _../\. ./\.._ ____. ____.
pacman@cqc.com|bigotries (should| [ | | ] / _> / _>
--------------+save some time): | \__/ \__/ \___: \___:
Linux,vim,trn,GPL,zsh,qmail,^H | "Screw you guys, I'm going home" -- Cartman
------------------------------
Date: Sat, 22 May 1999 03:42:16 GMT
From: armchair@my-dejanews.com
Subject: Re: Perl "constructors"
Message-Id: <7i592o$t2m$1@nnrp1.deja.com>
In article <7i3s4k$tmj$1@nnrp1.deja.com>,
John Porter <jdporter@min.net> wrote:
> In article <7i2v20$92c$1@nnrp1.deja.com>,
> armchair@my-dejanews.com wrote:
> > In article <7i1lsc$c7d$1@nnrp1.deja.com>,
> > John Porter <jdporter@min.net> wrote:
> > > Is the string that p points to null-terminated?
> > > Is it 8-bit clean?
> > > Is it legal SGML? Maybe get_some_chars actually returns a pointer
> > > to some class instance but has cast it to (char*).
> > > How do you know?
> >
> > If I may use the style of the newsgroup - "this is C++, this isn't
> > C. We
> > use strings in C++, not null terminated character arrays.
> > If you want to
> > program in C, maybe C++ is not for you".
>
> You are highly skilled at missing (or dismissing) my point.
I guess I missed it. We know that we have a char *. It is not a number
or string. You raise one highly unlikely scenario that I am very
surprised Russ Allberry hasn't jumped all over you about - 1.) you say
that maybe the function is casting a x pointer to a char * before
returning it and your raise another point that is related to a
programming error in code - 2. maybe we have a char * that is not
pointing to a null-terminated character array. This and the
identical in principal "legal SGML" question has you making a type of
"argument" that we see regarding legislation to outlaw something such as
guns - show an example where the proposed restrictions/changes would not
have been sufficient in a case - then try and make the listener take a
bogus logical step to - "so restrictions/laws/requirements/changes do
not help AT ALL".
>
> > int var = function();
> >
> > is var number or a string or an address?
> >
> > my $var = function();
> >
> > is $var a number or a string or an address?
> >
> > >
> > > A* p = get_next();
> > >
> > > Hmm, does p point to a B, or possibly a C?
> >
> > p is a pointer to an object that consists of at least object A.
> > Not a
> > number, not a string.
>
> You sound pretty sure of yourself.
>
> Now lets use more meaningful names, instead of A, B, C:
>
> Object* p = get_next();
P is a pointer. Not a number, not a string. You can say that in this
example we don't know exactly which object it points to, but we can see
that we are getting an object from one of the ones in our main
hierarchy. We have eliminated all objects that are not a part of our
heirarchy and all of our built in types. Even if our hierarchy is 50
objects, we still know it is one of them, and since we are processing it
generically, we probably don't care as we will be calling only those
functions that are common throughout (since root objects are often not
even instantiable but will contain functions that all derived objects
must override with their own methods).
my $p = get_next(); # is that next reference, next string or next
number? We don't even know it's a reference, let alone what type of
object (or object hierarchy) to which it may refer.
So yes, C++ type declarations do not tell us everything. But they always
tell us more than "scalar type".
>
> // Who can say what p really points to. It could point to an object
> // of any class derived from Object (which in some frameworks is
> // *every* class).
>
> Scalar* p = get_next();
>
> // Hmm. Maybe p points to a String, maybe to an Integer.
But we know it points. It's not a number or string via built-in types,
nor does it point to them. And it doesn't point to a MyObject. Doesn't
point to a MyOtherObject either.
my $scalar = get_next();
reference to object, and if so, what object? all we know is that
get_next() doesn't return an array or hash.
>
> Container* p = my_things();
>
> // p could point to a Set, a Bag, an OrderedSet, etc. etc.
We may not know which Container-derived class, but we know it is one of
them, and not a number or string or pointer to a MyObject or a
WindowObject, etc.
my $p = my_things(); # reference, number string? If reference -
stand_alone object? number? string? object in a hierarchy?
>
> Are you grokking yet? "scalar" can be thought of as a superclass
> of number and string and reference; and almost all of the time you
> only need to deal with the superclass, because almost all of the
> methods (get, set) are meaningfully defined in the subclasses.
Grokking? Great Ceasar's ghost my good man, I'm only a C++ programmer.
Here's a point you could/may be making: by looking at the code which
follows the declaration one can usually pick up the type. Such as
my $p = $a->get_next();
$p++; # clearly number (we hope)
my $p = $a->get_next();
my $z = $p . ".doc"; # gotta be a string (fingers crossed)
my $p = $a->get_next();
$p->Print();
# better be a reference, but to what
# exactly (in our hierarchy
# or standalone - many of our objects have Print()?)
$p->GetWindowSize(); # has to be a window object
$p->Boogaloo(); # if I remember correctly only class
# Abc does that
my $p = $a->get_next();
DoSomething($p); # oops can't quite remember what the DoSomething
# function does or takes - gotta look at it or
# $a->get_next() to have a clue about $p.
>
> The "deference" method is not meaningfully defined for all three
> subclasses; but the ref() method is there to tell you whether the
> scalar is a reference, and what kind. So you can do this:
>
> if ( ref($r) =~ /ARRAY/ ) {
> @a = @{$r};
> }
> elsif ( ref($r) =~ /HASH/ ) {
> %h = %{$r};
> }
> elsif ( ref($r) =~ /SCALAR/ ) {
> $s = ${$r};
> }
> else {
> print "$r is not a reference.\n";
> }
I wasn't suggesting that you need to check the type of $a as in
" my $a = my_func(); "
in code. You can assume my_func() is giving you the right thing - just
suggesting that explicit types makes a program easier to follow. You
can't as easily intuit it as when the variable declaration specifies a
type, although as in the examples above, it can be done if the following
code is only applicable to one of the scalar types.
Obviously saying "my reference $a = my_func();" is not a requirement for
Perl programs to work. "my $a = my_func();" works just as well. And this
is not a major stumbling block, not a brick wall, etc. I certainly don't
expect Perl to introduce any scalar variable type declarations over and
above what I am hearing about in add-on module fields.pm. And I don't
expect many changes in the basics of Perl at all. Larry Wall did an
interview with Amazon.com (still available on their site) in which he
says that the Perl 5 upgrade (he calls 1-4 "the prototype") took a lot
of work (as in wore him out) and he doesn't plan on doing it again
anytime soon (as in probably never again).
--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---
------------------------------
Date: Sat, 22 May 1999 03:04:13 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: PERLFUNC: ref - find out the type of thing being referenced
Message-Id: <37461E59.989B5300@home.com>
[posted & mailed]
Peter Scott wrote:
>
> Interesting. I did some playing around with this on 5.004_04 on
> Solaris 2.5.1 and found some results I didn't understand:
[code snipped]
> Fred Cobblestone
> Atom Cobb
This appears to be a bug. I get 'Atom Cobble' with 5.005_03.
> Pepe Cobblew
>
> I don't understand the clipping in the second two.
substr('Pepe le Pew', 5, 5) eq 'le Pe' so replacing that with 'Cobble'
gives 'Pepe Cobblew'.
--
Rick Delaney
rick.delaney@home.com
------------------------------
Date: Sat, 22 May 1999 03:49:36 GMT
From: tekkin@hotmail.com (Ken Williams)
Subject: Remove line from big flatfile?
Message-Id: <3746296a.0@news.cgocable.net>
I have a text file that looks like:
name12@here.com:h
text2@there.com:h
moretext@isp.com:t
test@aolsucks.com:h
testname1@alot.com:t
etc.
Whats the easiest way to remove all, say "moretext@isp.com" lines while
keeping everything else the way it is? Each line a \r\n after it. So
moretext@isp.com:t is actually moretext@isp.com:t\r\n if that matters.
Thanks.
------------------------------
Date: 21 May 1999 21:52:54 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Remove line from big flatfile?
Message-Id: <37462a16@cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc, tekkin@hotmail.com (Ken Williams) writes:
:I have a text file that looks like:
:
:name12@here.com:h
:text2@there.com:h
:moretext@isp.com:t
:test@aolsucks.com:h
:testname1@alot.com:t
:
:Whats the easiest way to remove all, say "moretext@isp.com" lines while
:keeping everything else the way it is?
The way that FAQ tells you to, of course. What part of the 2nd question
of part 5 of the perl FAQ list, WHICH IS PART OF PERL, was unclear?
:Each line a \r\n after it.
You'd think so, but you'd be wrong.
--tom
--
Sockets are the X windows of IO interfaces. --Rob Pike
------------------------------
Date: Sun, 16 May 1999 00:35:28 GMT
From: ryanngi@hotmail.com (Ryan Ngi)
Subject: Uploading file with Information with Perl has an unresolved problem
Message-Id: <373e10fd.34236696@news.inet.co.th>
i'm writing a script to upload a file attach with information of user,
i do this(modify from web review)::
#!/usr/local/bin/perl
use CGI qw/:standard/;
$CGI::POST_MAX=1024 * 25; # max 25K posts
$file_name = param('file_name');
$file_type = param('file_type');
$text = param('text'); <-1
&Print_Error if($file_name eq "");
&Print_Results;
open(FILE,">text.txt"); <-2
print FILE $text; <-3
close(FILE); <-4
sub Print_Results{
if($file_type eq "text"){
print header();
print start_html('File Upload Test');
print "<PRE><B>File Name:</B> $file_name\n";
print "<B>File Contents:</B>\n";
while(<$file_name>){ print $_; }
print "</PRE>";
print end_html;
} else {
print header('image/gif');
while(read($file_name,$data,1024)){ print $data; }
} # End of if..else
} # End of subroutine.
sub Print_Error {
print "Content-type: text/html\n\n";
print "<p>Field 'File Name' must be filled in for
this script to work properly.</p>\n" ;
exit 0;
}
1,2,3,4 is the line that i insert, andddd i use this html to send ::
<INPUT TYPE="radio" NAME="file_type" VALUE="text" CHECKED>-Text
<INPUT TYPE="radio" NAME="file_type" VALUE="graphic">- Graphic
<INPUT TYPE=text name="text"> <------5
5 is insert by me
when 5 is not here ,it's work,but when 5 exist
cgi ERROR
i know how to send binary via perl, but i don't know how to attach
binary with information, Is there anyone can help me? pleasee
------------------------------
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 5749
**************************************