[16704] in Perl-Users-Digest
Perl-Users Digest, Issue: 4116 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Aug 24 06:05:57 2000
Date: Thu, 24 Aug 2000 03:05:09 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <967111509-v9-i4116@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Thu, 24 Aug 2000 Volume: 9 Number: 4116
Today's topics:
Re: @_ as array <skv@iis.nsk.su>
Re: A Proposal for BaseLib module (was Re: Modifying @I <hasant@trabas.com>
about CGI <mslho@my-deja.com>
Re: about CGI (Rafael Garcia-Suarez)
Re: about CGI <godzilla@stomp.stomp.tokyo>
Re: Flipflop matching (Logan Shaw)
Re: Just another silly post. (brian d foy)
Re: Just another silly post. (brian d foy)
Re: lwp post method matt@NOSPAMcipherdesign.com
Re: Mail::Send <somewhere@planet.earth>
Re: my and local (Abigail)
Re: Perl vs. other scripting languages <katz@underlevel.net>
Re: Perl vs. other scripting languages <godzilla@stomp.stomp.tokyo>
Re: Perl vs. other scripting languages <nickco3@yahoo.co.uk>
Re: Problem accessing CGI.pm <alesr@siol.net>
Re: Running commands with arbitrary EUID and RUID (Abigail)
Re: Set @ARGV and ignore STDIN? philhibbs@my-deja.com
Re: Strict and Binary Image Upload nobull@mail.com
use CGI to remove files (doco)
Re: write a file in an array <heydenreich@delta.de>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 24 Aug 2000 14:23:03 +0600
From: "Konstantin Stupnik" <skv@iis.nsk.su>
Subject: Re: @_ as array
Message-Id: <8o2ifm$2h4v$1@nl.novosoft.ru>
"Amir E. Aharoni" <amir_e_a@netvision.net.il> wrote in message
news:8o1f07$rtt$1@news.netvision.net.il...
> > On Tue, 22 Aug 2000 13:11:46 +0200, "LecturaX Porodum"
> > <haak12@remove.ie.hva.nl> wrote:
> >
> > >Hi,
> > >
> > >How can I best achieve to retrieve the second element (element 1) from
> @_?
> > >
> > >I get a warning when I do @_[1], but I imagine $_[1] wouldn't work
> either,
> > >as $_ is a reserved variable as well.
> > >
> >
> > my ($notwanted,$wanted) = @_;
> >
>
> Actually $_[1] will do just what you want.
>
> $_ and @_ are _completely different_ variables; just as $keanu and @keanu
> are completely different variables; the $ and @ characters are inseparable
> parts of variables' names.
>
> # Creates a scalar variable called $keanu and assigns "Reeves" to it
> my $keanu = "Reeves";
>
> # prints "Reeves"
> print $keanu;
>
> # Creates an array called @keanu and assigns 3 values to it
> my @keanu = ("Speed", "Matrix", "Devil's Advocate");
>
> # Prints "Matrix"
> print @keanu[1];
>
> # Prints 3 - the size of the array
> print @keanu;
Here should be:
print scalar(@keanu);
since 'print @keanu;' will do something like
print join('',@keanu);
But in general you are right.
Scalar and array with the same name are completely different things,
so $_ shouldn't be confused with @_.
--
Best regards,
Konstantin.
Brainbench MVP for perl.
------------------------------
Date: Thu, 24 Aug 2000 08:14:40 GMT
From: Hasanuddin Tamir <hasant@trabas.com>
To: bandung-pm-list@happyfunball.pm.org
Subject: Re: A Proposal for BaseLib module (was Re: Modifying @INC...)
Message-Id: <8o2lh4$s75$1@nnrp1.deja.com>
In article <39a4b3d5@news.victoria.tc.ca>,
yf110@vtn1.victoria.tc.ca (Malcolm Dew-Jones) wrote:
> Hasanuddin Tamir (hasant@trabas.com) wrote:
> : In article <sq8n506bt91153@corp.supernews.com>,
> : "Chris Stith" <mischief@motion.thispartfake.net> wrote:
> : >
> : > "Malcolm Dew-Jones" <yf110@vtn1.victoria.tc.ca> wrote in message
> : > news:39a41d62@news.victoria.tc.ca...
> : > > hasant@trabas.com wrote:
> : > > : The Problem
> : > >
> : > > : Determine a non-standard module path dynamically
> : > > : in the scripts.
> : > >
> : > > Can you not define the PERL5LIB environment variable before
hand?
> : >
> : > I might even suggest putting a small config file in the
> : > application's base directory, which lists where the
> : > modules to be included reside. Read it in once, reuse it
> : > thoughout any part of the code that needs it. This could
> : > be done for the base directory, too, for that matter, in case you
need
> : to
> : > find data files or whatever based on that.
>
> : Then how do you define the full path to that config file? As I
> : suppose it must be read by every script.
>
> That depends on what your situation is.
>
> If your scripts are being run by a web server then confirm what
> conventions it uses regarding the current directory when a script
starts
> and place the config file relative to that.
>
> I have heard that different servers have different conventions -
though
> the only convention I have ever come across is that a script starts in
> it's own base directory. E.g. /web_stuff/mycgi.pl will be running in
the
> /web_stuff directory.
>
> A typical technique is to have several links of a script in different
> directories. Each directory has its own copy of a file, perhaps
called
> "config.pm", that has customized settings for the scripts that start
in
> that directory.
>
> The config settings control what the script does.
>
> The web server controls who has access to which directory, and hence
> indirectly controls what a user can do when running the script.
>
> Another scenario is that a regular user is using your script from the
> shell prompt. It might then be the user's responsibility to run a
config
> script before they run you application. (A well known example of this
> strategy is Oracle).
>
> Or use a variable such as the username to find the directory (like
.shrc
> and etc.)
>
> You could also have a single hard coded name, and have that script
> determine what configuration should be used by examining such items as
the
> username, the current directory, the calling scripts name, etc.
>
> I assume that some will take issue with any one of these, though I
have
> come across all of them in use.
>
>
I think I've explained my situation in my original posting.
Despites of what Chris and you have suggested, I think none
of you have considered the whole, or at least the main point,
of my posting.
There were several sections, and The Problem section was only
as basic or opening for discussion. If you moved down a few
lines, you would find The Requirement section which explained
the situation.
Scrolling down would bring you to The (alternative) Solutions
I could think of and finally The Proposal of my own solution,
which was the main point of the whole story, that is I proposed
a new module called BaseLib to fulfill the requirements and it
was open for discussion.
This thread didn't go as expected since you seemed to only
quote the problem part. But I also realized that I have put
misleading subject and that people tend to quick-scanning
part of (specially long) ng message. If this is not true, I'm
sorry, never meant to blame anyone but myself.
So I think I need to repost what I wanted to say in a new thread
to make this straight (hopefully). I hope both of you, Chris and
Malcolm, are still interested in discussing this matter.
Thank you very much,
Best regards,
san
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Thu, 24 Aug 2000 07:27:51 GMT
From: Manuel Ho <mslho@my-deja.com>
Subject: about CGI
Message-Id: <8o2ip8$pkq$1@nnrp1.deja.com>
hi all,
how can i store files in user directories? since i am 'nobody' when
running in the webserver, i can't change uid/gid to each user and put
the file there??! is there a way i can do it?
many thanks,
manuel.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Thu, 24 Aug 2000 07:53:50 GMT
From: rgarciasuarez@free.fr (Rafael Garcia-Suarez)
Subject: Re: about CGI
Message-Id: <slrn8q9lf8.gds.rgarciasuarez@rafael.kazibao.net>
Manuel Ho wrote in comp.lang.perl.misc:
>hi all,
>
>how can i store files in user directories? since i am 'nobody' when
>running in the webserver, i can't change uid/gid to each user and put
>the file there??! is there a way i can do it?
What kind of files? In which directories? The simplest way is perhaps to
(1) give write permission to nobody in the specified directory,
or (2) if the file to create always has the same name, create it once
and for all with write permission for nobody.
--
Rafael Garcia-Suarez
------------------------------
Date: Thu, 24 Aug 2000 01:00:54 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: about CGI
Message-Id: <39A4D636.6D3ED5FD@stomp.stomp.tokyo>
Manuel Ho wrote:
I am fascinated by this. How did you come to
have a Hispanic first name and an Oriental
last name?
> how can i store files in user directories?
You don't. This is unethical for a web server
owner and illegal for others. Short of user
related files, such as a courtesy counter or
perhaps user statistics, you have no business
meddling with bought and paid-for sole propriety
of another.
> since i am 'nobody' when running in the webserver,
> i can't change uid/gid to each user and put
> the file there??! is there a way i can do it?
Yes, if you don't mind violating written law and
taking a risk on imprisonment, should you not be
the owner of this web server. If so, if an owner,
you run a risk having a person like me getting in
your face for messing with my private property.
What you ask, is either unethical or illegal,
without an owner's explicit permission.
Godzilla!
------------------------------
Date: 24 Aug 2000 03:31:50 -0500
From: logan@cs.utexas.edu (Logan Shaw)
Subject: Re: Flipflop matching
Message-Id: <8o2mhm$8nm$1@provolone.cs.utexas.edu>
In article <x71yzftqfd.fsf@home.sysarch.com>,
Uri Guttman <uri@sysarch.com> wrote:
>when people use ^^^ to mark something, they assume a fixed width
>font. most normal mail and newsreaders use fixed width for that
>reason. but with a web based reader who knows what it will look like.
It will look right if the web-based reader uses PRE tags around the
text of the news article.
But apparently a certain company's web-based reader doesn't do that.
(Or, to give them the benefit of the doubt, maybe it doesn't do that by
default and perhaps it could be made to do that...)
- Logan
------------------------------
Date: Thu, 24 Aug 2000 03:21:57 -0400
From: brian@smithrenaud.com (brian d foy)
Subject: Re: Just another silly post.
Message-Id: <brian-ya02408000R2408000321570001@news.panix.com>
In article <39A48859.B8FA1697@yahoo.com>, Policy Man <reljr_2@yahoo.com> posted:
> brian d foy wrote:
> > eval ( <> )
> >
> > and that pretty much takes care of all of the restrictions
> > given appropriate input.
> @given = glob "/tmp";
> print join "\n",
those two lines are not in my program. even that program has
one more semicolon than you allow.
> eval (<>) ;
>
> apparently produces nothing.
give it some input. see the docs on the <> operator.
--
brian d foy
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
Perl Mongers <URL:http://www.perl.org/>
------------------------------
Date: Thu, 24 Aug 2000 03:24:04 -0400
From: brian@smithrenaud.com (brian d foy)
Subject: Re: Just another silly post.
Message-Id: <brian-ya02408000R2408000324040001@news.panix.com>
In article <slrn8q930n.tj3.abigail@alexandra.foad.org>, abigail@foad.org posted:
> Oh, btw, there's a trivial way around most of the restrictions. Code
> the thing in whatever way you want. Turn the code into a string. Replace
> all characters with octal escapes.
write a program using only ones and zeros. ;)
--
brian d foy
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
Perl Mongers <URL:http://www.perl.org/>
------------------------------
Date: Thu, 24 Aug 2000 07:34:12 GMT
From: matt@NOSPAMcipherdesign.com
Subject: Re: lwp post method
Message-Id: <39a4cefb.979748@news.ntlworld.com>
thanks for the reply,
>It doesn't even do that for me -- it gives an error. I suspect
>it's because AltaVista isn't set up to respond to POST requests.
>The search forms use GET.
what error do you get? i dont get one, wether i use get or post. i
started of using get, but then i changed to post, because i thought
that this was one of the times when you dont use get (because you dont
want your answer cached - or does it not matter in this case?)
however i remain confused, because so far the only way i have managed
to log into the original site (that i was trying to in the first post)
is via get, even though the form is a post method.
aarrgh!
can someone point me to some documentation? im rereading all the lwp
stuff that comes with the module at the moment.
thanks, matt
------------------------------
Date: Thu, 24 Aug 2000 10:06:28 +0200
From: "Dimitri Gunsing" <somewhere@planet.earth>
Subject: Re: Mail::Send
Message-Id: <8o2l1p$pmo$1@list.pbnec.nl>
You can use mail::sender like this (btw, the header I pass is not important
you don't need to do that (unless you want to send your messages in HTML) :
You can use this subroutine like this :
&mail("origin@somewhere.com", "smtp.somewhere.net",
"receiver@somewhere.com", "Subject text here", "Here will be your body");
Don't mind the &croak function, it's something I've written myself (similar
to the one in CARP).
# subroutine to send a mail
sub Mail {
# store the local variables
local ($origin, $mailserver, $receiver, $subject, $text) = @_;
# connect to the SMTP server
$sender = new Mail::Sender( { from => $origin,
smtp => $mailserver,
headers => "MIME-Version: 1.0\r\nContent-type:
text/html\r\nContent-Transfer-Encoding: 7bit" } );
# see if the connection is established
if(!(ref $sender) =~ /Sender/i) {
&croak($Mail::Sender::Error);
}
# now send the message
$sender->MailMsg ({ to => $receiver,
subject => $subject,
msg => $text} );
# check if the mail was send successfully
if(($sender->{'error'}) < 0) {
&croak($Mail::Sender::Error);
}
}
Good luck.
Dimitri
Bryan Spencer <bcspencer2@home.com> wrote in message
news:39A43813.2D0CCED@home.com...
> I recently downloaded the MailTools package
> but I seem to be having to problems.
>
> 1.) It seems to work correctly but when I use it it feeds a message
> throught to my browser which says $msg->close
> is not part of the Mail::Send package.
>
> 2.) I cannot figure out how to fill in who the email that I am sending
> is from.
>
> Any help would be greatly appreciated.
>
------------------------------
Date: 24 Aug 2000 09:13:39 GMT
From: abigail@foad.org (Abigail)
Subject: Re: my and local
Message-Id: <slrn8q9pon.tj3.abigail@alexandra.foad.org>
LecturaX Porodum (haak12@remove.ie.hva.nl) wrote on MMDXLVIII September
MCMXCIII in <URL:news:39a25cb2$0$27092$503c8c87@>:
!! Hi,
!!
!! I am running into the following problem.
!!
!! I am a C programmer, with certain C-programming habits, which I tend to
!! practice when programming Perl as well.
!!
!! I am trying to write a package/module which can be imported using either
!! "use" or "require" (the whole "at compile time" and "at runtime" is unclear
!! to me - what are the advantages of including at runtime?).
Faster startup time of your program. Also, if you do it at run time, you
can conditionally require. A common example is the Carp module. You encounter
code like this:
sub carp {require Carp; goto &Carp::carp}
sub croak {require Carp; goto &Carp::croak}
No time is waisted compiling Carp.pm if the program doesn't carp() or croak().
!! In this module I want to using variables which are local to this module,
!! thus I define them using
!!
!! local $var;
!!
!! or
!!
!! local ($var1, $var2);
That creates local *values*. You probably want my().
!! This gives me the following error (using both strict and diagnostics):
!!
!! --------------- 8< ---------------------------------------------------------
!! Variable "$cpOptionPrefix" is not imported at ./buildhtml.pl line 36 (#1)
!!
!! (F) While "use strict" in effect, you referred to a global variable
!! that you apparently thought was imported from another module, because
!! something else of the same name (usually a subroutine) is exported
!! by that module. It usually means you put the wrong funny character
!! on the front of your variable.
Really? That's amazing. You get the above diagnostics, about $cpOptionPrefix
when you do "local $var1"?
!! Global symbol "$cpOptionPrefix" requires explicit package name at
!! ./buildhtml.pl line 36 (#2)
!!
!! (F) You've said "use strict vars", which indicates that all variables
!! must either be lexically scoped (using "my"), or explicitly qualified to
!! say which package the global variable is in (using "::").
!! --------------- 8< ---------------------------------------------------------
!!
!! How can I make variables that are local to a package or where can I find
!! more information on creating my own package/module?
You would use "my".
Scoping of variables is discussed in an unlikely manpage: perlsub.
Abigail
--
perl -e '* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
/ / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %;
BEGIN {% % = ($ _ = " " => print "Just Another Perl Hacker\n")}'
------------------------------
Date: 24 Aug 2000 03:27:04 -0400
From: Jordan Katz <katz@underlevel.net>
Subject: Re: Perl vs. other scripting languages
Message-Id: <m3n1i3ruev.fsf@underlevel.underlevel.net>
Uri Guttman <uri@sysarch.com> writes:
> >>>>> "JK" == Jordan Katz <katz@underlevel.net> writes:
>
> JK> tjla@guvfybir.qlaqaf.bet (Gwyn Judd) writes:
> >> > Damian Conway.
> >>
> >> Who's Damian Conway?
>
> JK> I believe he's the author of Glade and a few Perl modules (look him up
> JK> on CPAN.) Why is he mentioned? No idea.
>
> huh? glade is a gui development tool and damian hasn't done much
> graphics work that i know about. but he posts here sometime when
> subjects that interest him crop up.
Oops, that's D. Chaplin who did the work on Glade. I got the two
mixed up somehow.
> FYI he is a professor of CS in australia and the author of one of the
> best perl books 'object oriented perl'. he has authored modules which
> support what abigail claims can't be done in OO perl. he is also very
> funny, witty and a very nice guy.
>
> he was mentioned because abigail knows he is one of the best things perl
> has going for it and i agree.
I see. Thanks for the information.
--
Jordan Katz <katz@underlevel.net>
------------------------------
Date: Thu, 24 Aug 2000 00:25:26 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Perl vs. other scripting languages
Message-Id: <39A4CDE6.DB7BD579@stomp.stomp.tokyo>
Steve wrote:
> Abigail wrote:
> > Each new version of Perl will break half of your programs.
(snipped)
> I'm hoping the designers of Perl 6 will give consideration to
> the needs of programmers who enjoy Perl but don't have time to
> keep up with an ever-changing language; and who need release
> stability to protect production environments.
> I'm interested in hearing how others feel about these issues.
Seems a lot of current Perl programmers are lacking a good
lick of sense. There is an obvious and practical solution
to this downgrading of Perl with each new version. This
realistic solution is to write your programs in a blend of
Perl 4 and early Perl 5 versions. So very logical, yes?
My observation is, for the most part, those who use late
releases of Perl 5 are obsessive Techno-Geeksters whom are
addicted to having the latest and greatest of the worst.
A trend has been established with Perl. Each new release
is worse than the last. This Perl 5.6 is, by far, the most
rabbit hole ridden and buggy version released. With this
trend in mind, a ventured safe guess is Perl 6 will be the
last small handful of coffin nails for Perl.
Perl 6 most likely will be a Death Knell for Perl as a
popular programming language. Word will wildly spread,
as it has with Perl 5.6,
"Your Perl programs won't run under new versions."
This is in evidence already earmarked by numerous
articles in this newsgroup discussing transition
problems from older Perl 5 to new Perl. Problems
of this sort have a well established history, but
more so with 5.6 Perl.
Common sense clearly indicates upgrading to most
recent versions of Perl, is a major mistake. In
time, Perl will whimper and die, other programming
languages will fill this gap when Perl falls out
of the programming picture. Current designers of
Perl are slowly killing Perl by being obsessive
Techno-Geeksters addicted to this high tech drug,
obfuscation rather than keeping Perl clean and
natural with simplicity.
Addicted Techno-Geeksters are obsessed with having
every whistle, bell and flashing light possible and,
pay a price, poor health in programming.
Those of us with a lick of sense and a clean bill
of health, keep it simple and, pay a price as well;
we must be critical thinkers and willing to work hard.
We have a Mercedes SL, fairly new, high price tag, ouch.
We also have a collection of classic Corvette Mako Sharks.
Our Mercedes, mostly it sits, collecting dust and losing
value quicker than my butt is growing. Sure, it has every
whistle, bell and flashing light possible, even wipers
on the headlights. Whoopie. Actually, I bought this Mercedes
much to my girl's father's objections. Yeah so, I'm getting
old and so is my money. I bought this Mercedes to symbolic
flip a finger for my high school chums who claimed I would
never amount to more than a hooker. Well, they live down
there, I live up here and, I thumb my nose at them, for
a price; owning a piece of mule manure Mercedes.
Obsessive Techno-Geeksters drive brand new Perl Mercedes.
Nearly every day, a hard decision. What color Mako Shark
shall I drive today? Should I accessorize to blend? Red,
blue, burgundy or.. yes! I will drive my white Mako. She
has five-hundred horses under her raised hood, a close
ratio five speed, positraction via four elevens. She
churns and burns asphalt. No wipers on her headlights
though and old fashion analog gauges along with being
a bit of a tight squeeze getting my big butt into her
driver's bucket seat. Only flashing light our Makos
have, is this red one which, not too often, appears
in a rear view mirror, back there with the Mercedes.
Ever drive at one-eighty across a deserted desert
highway, T-tops down, tank top down, listening to
Steppenwolf at five-hundred watts while eating
frozen yogurt? A thrill I'll say.
Purist Perl 4 programmers drive Mako Sharks.
Godzilla!
--
Steppenwolf, the Mako Sharks of Rock N Roll.
http://la.znet.com/~callgirl3/bornwild.mid
------------------------------
Date: Thu, 24 Aug 2000 10:44:53 +0100
From: Nick Condon <nickco3@yahoo.co.uk>
Subject: Re: Perl vs. other scripting languages
Message-Id: <39A4EE95.2C2F0DB0@yahoo.co.uk>
"Godzilla!" wrote:
> Perl 6 most likely will be a Death Knell for Perl as a
> popular programming language. Word will wildly spread,
> as it has with Perl 5.6,
>
> "Your Perl programs won't run under new versions."
Didn't do Microsoft any harm. That's been their policy almost since day
one.
------------------------------
Date: Thu, 24 Aug 2000 09:48:03 +0200
From: marvin <alesr@siol.net>
Subject: Re: Problem accessing CGI.pm
Message-Id: <39A4D333.C13@siol.net>
Pham wrote:
>
> Hi
>
> My Perl script works fine under Linux but when moving it onto a
> Solaris server I have trouble running the script because problem with
> accessing CGI.pm. It can't see CGI.pm even though the module is on the
> system. So I wonder if there is any config. files or variables on the
> system that should be reconfigured?
>
> Thanks for help.
>
> Perl Amateur
If you have file on system
(usually on Solaris is in /usr/local/lib/perl<num>/<version>/),
then run perl in debug mode and see which directories does it
have in path.(x @INC).
If its not there, then you have a variable (I'm not
sure if @INC is that variable) that you need to update with that
directory.
push( @INC, "/usr/local/....")
Notice also, you must do that immediately after #! line
------------------------------
Date: 24 Aug 2000 09:25:36 GMT
From: abigail@foad.org (Abigail)
Subject: Re: Running commands with arbitrary EUID and RUID
Message-Id: <slrn8q9qf4.tj3.abigail@alexandra.foad.org>
Andre Majorel (aym@aym4.domicile.fr) wrote on MMDXLVIII September
MCMXCIII in <URL:news:slrn8q4vv2.jp.aym@aym4.domicile.fr>:
?? Is there a module or something that would allow a Perl script
?? running as root to create processes with arbitrary effective and
?? real UID ? I'm looking for a function like :
??
?? system2 $uid, "/some/command -w options";
??
?? that would do about the same thing as :
??
?? system "su $user -c \"/some/command -w options\"";
??
?? but without the overhead of an extra process and the annoyance
?? of an extra level of quoting.
Well, you don't need the extra level of quoting. Use the list form,
and you save yourself a shell as well:
system su => $user, -c => "/some/command -w options";
?? [Since I need to become root again after creating the child
?? process, I can't just do $< = $uid]
Sure you can. fork(), set the uid, and exec.
Abigail
--
perl -le 's[$,][join$,,(split$,,($!=85))[(q[0006143730380126152532042307].
q[41342211132019313505])=~m[..]g]]e and y[yIbp][HJkP] and print'
------------------------------
Date: Thu, 24 Aug 2000 07:56:31 GMT
From: philhibbs@my-deja.com
Subject: Re: Set @ARGV and ignore STDIN?
Message-Id: <8o2kf8$r8d$1@nnrp1.deja.com>
In article <39A4A24E.65A9543F@email.sps.mot.com>,
Tk Soh <r28629@email.sps.mot.com> wrote:
> philip.hibbs@tnt.co.uk wrote:
> >
> > Here's my code:
> >
> > $match = shift;
> ^^^^^<----- hmmm....
D'OH! I fell into the classic trap of "It's a new language I'm learning,
therefore my bug must be a fundamental misunderstanding of some strange
concept".
Thanks.
Phil.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 24 Aug 2000 08:53:40 +0100
From: nobull@mail.com
Subject: Re: Strict and Binary Image Upload
Message-Id: <u9n1i313pg.fsf@wcl-l.bham.ac.uk>
Ed Waldspurger <ewald@electronicfrontiers.com> writes:
> I am trying to upload a binary image file using CGI.pm and am having
> trouble with strict.
perldoc CGI
Read the section that follows the sentence "If you use strict, then
Perl will complain when you try to use a string as a filehandle."
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: 24 Aug 2000 09:43:19 GMT
From: is83024@cis.nctu.edu.tw (doco)
Subject: use CGI to remove files
Message-Id: <8o2qno$55g$1@news.cis.nctu.edu.tw>
Dear All:
I am writing a CGI PERL program, which is able to delete designed files I
chose thru Browser. The problem I am facing is that I can delete the files
on the System, but by going thru Browser, I can not delete the files. In
other words, at the System, I can use "$perl kill.pl delete_file" to delete
the files. But by using Browser, I can not use
http://localhost/cgi/kill.pl?delete_file to delete the files. The following
is my source of the program:
rm_list_file(@ARGV);
sub rm_list_file
{
$a = $_[0];
if ($a eq "")
{ print 6;}
else
{ print m $a;}
print $a;
}
Thank you very much for your attention.
--
*
------------------------------
Date: Thu, 24 Aug 2000 10:50:06 +0200
From: Ralf Heydenreich <heydenreich@delta.de>
Subject: Re: write a file in an array
Message-Id: <39A4E1BE.327AE912@delta.de>
sorry, I'm never been here. Perhaps it's better to learn BASIC at first
:)
Ralf Heydenreich schrieb:
> try this (the easiest way):
> $idx=0;
> while(<FILE>)
> {
> $file[$idx]=$_;
> $idx++;
> }
>
> Ralf.
>
> Javier Hijas wrote:
>
> > Can you tell me a nice way to copy an entire file in an array?
> >
> > i.e:
> >
> > print @file <=========> while (<FILE>){
> > print;
> > }
------------------------------
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 4116
**************************************