[12412] in Perl-Users-Digest
Perl-Users Digest, Issue: 6012 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jun 16 05:07:14 1999
Date: Wed, 16 Jun 99 02:00:21 -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 Wed, 16 Jun 1999 Volume: 8 Number: 6012
Today's topics:
Re: Accessing characters in a string? (John L. Allen)
Re: Afraid to ask about Y2K! <gellyfish@gellyfish.com>
Can anyone explain this behavior? <bobmin@nidlink.com>
Re: Can anyone explain this behavior? (brian d foy)
Re: examples (David H. Adler)
Re: File Processing (Larry Rosler)
Re: File Processing <wyzelli@yahoo.com>
Re: File Processing <rra@stanford.edu>
Re: File Processing ericho@sehk.com.hk
Re: Fix this uglyness <garethr@cre.canon.co.uk>
Re: How to scan a directory and put all the files and t <dave@dave.org.uk>
Re: how to substitute a whole paragrah in a file <jbell@263.net>
Re: how to substitute a whole paragrah in a file <wyzelli@yahoo.com>
Re: IO::Socket, Socket (Lars Gregersen)
Re: Is it better perl than awk ? (Ilya Zakharevich)
MacPerl newbie: installing module problem (Rory C-L)
Re: net::ftp <davidk@netscape.com>
Re: Perl Server? (Lars Gregersen)
Re: perlie tree <cschmitz@stud.informatik.uni-trier.de>
Problems with File-module <thomas@bibsyst.no>
Re: Regex question <JFedor@datacom-css.com>
Re: regexp trouble.. <JFedor@datacom-css.com>
Re: separate file (Tad McClellan)
Re: this charecter @ ruined my day!! (Marc Bissonnette)
Re: this charecter @ ruined my day!! <JFedor@datacom-css.com>
Re: this charecter @ ruined my day!! <dave@dave.org.uk>
understanding 'You need to quote "sub" at..' (Bill)
Re: user IP <gellyfish@gellyfish.com>
using strict... <joeyandsherry@mindspring.com>
Re: using strict... <dave@dave.org.uk>
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 15 Jun 1999 14:29:36 -0400
From: allen@gateway.grumman.com (John L. Allen)
Subject: Re: Accessing characters in a string?
Message-Id: <7k662g$jig@gateway.grumman.com>
In article <7jsl8h$p25$1@links.magenta.com>,
SMS/Christian Fowler <sms@links.magenta.com> wrote:
>Alan Petersen (alan@ultra.finchcomputer.com) wrote:
>:
>: substr EXPR,OFFSET,LEN
>:
>: For example:
>: $c = substr $myString,$n,1;
>
>Thanks! I did find this but figured for sure there had to be a better way
>if you only wanted just one character! oh well.
Here's another way
$c = unpack P, pack N, $n + unpack N, pack P, $myString;
Hardly what I'd call "better" though, but feel free to use it in japhs :-)
John.
--
_/JohnL\_allen@gateway.grumman.com <Sun>: 9.5 billion pounds per sec to energy
~\Allen/~Fax: 516-575-7428 <Universe>: 1e22 stars = 22 solar masses per sec
------------------------------
Date: 16 Jun 1999 09:20:50 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Afraid to ask about Y2K!
Message-Id: <37675e62@newsread3.dircon.co.uk>
Jerome O'Neil <jeromeo@atrieva.com> wrote:
>>> Many people really seem to think that civilisation will end at jan 1,
>>> 2000, 12 AM.
>>
>> How can 12 be "AM"? If you mean 00:00, which you presumably do, then
>> it's exactly half way between two middays, so it's no more accurate to
>> call it before midday than after midday; and if it's 12:00 then it's
>> neither before nor after: it _is_ midday! and the disaster, whatever it
>> may be, will already be underway.
>>
>> Anyway, the new millennium doesn't start till a year later.
>
> This thread is now one pedant long.
>
> O'Neil's corollary at work.
>
I think we'll call this game Y2K Crescent ...
/J\
--
"As usual I'm the price you have to pay for the funny bits" - Denis Norden
------------------------------
Date: Wed, 16 Jun 1999 00:42:36 -0700
From: Bob Minnick <bobmin@nidlink.com>
Subject: Can anyone explain this behavior?
Message-Id: <3767556B.3763A5E0@nidlink.com>
I've run across something interesting concerning split and am wondering
if anyone can explain this behavior.
Consider the following;
($var1, $var2)=split(/ /,$arrary[$index],2);
According to my documentation (camel book) split should split the array
into the two variables where it finds the space (contained between the
slashes), but what is happening is $var2 is getting the second value,
but it also contains a trailing space. I can easily code around this
problem, but it would be more elegant to doing it with the split,
assuming split works the way the documentation claims it does. Now my
camel book was up to date as of perl4, has the functionality changed
since then?
I'd appreciate an email if someone can explain this.
Bob Minnick, Northern Webs
--
Bob Minnick, President of Northern Webs
Northern Webs, North Idaho's Web Design Studio/Presence Provider
MEMBER OF THE INTERNET DEVELOPERS ASSOCIATION & IWA
-------------------------------------------------------------------
Our Homepage
http://www.northernwebs.com/
The Search Engine Tutorial
http://www.northernwebs.com/set/
Meta Medic, the oldest free online Meta Tag Validator on the net.
(Over 4 Million urls tested)
http://www.northernwebs.com/set/setsimjr.html
------------------------------
Date: Wed, 16 Jun 1999 04:16:38 -0400
From: brian@pm.org (brian d foy)
Subject: Re: Can anyone explain this behavior?
Message-Id: <brian-ya02408000R1606990416380001@news.panix.com>
In article <3767556B.3763A5E0@nidlink.com>, Bob Minnick <bobmin@nidlink.com> posted:
> Consider the following;
>
> ($var1, $var2)=split(/ /,$arrary[$index],2);
>
> According to my documentation (camel book) split should split the array
> into the two variables where it finds the space (contained between the
> slashes), but what is happening is $var2 is getting the second value,
> but it also contains a trailing space. I can easily code around this
> problem, but it would be more elegant to doing it with the split,
> assuming split works the way the documentation claims it does.
it is working as documented. it split it into two pieces just liked
you asked it to. it only gets rid of the separator between the
pieces. it doesn't do any further processing of the data.
--
brian d foy
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
Perl Monger Hats! <URL:http://www.pm.org/clothing.shtml>
------------------------------
Date: 16 Jun 1999 00:27:32 -0400
From: dha@panix.com (David H. Adler)
Subject: Re: examples
Message-Id: <slrn7me9tj.643.dha@panix.com>
On 14 Jun 1999 22:09:56 -0500, Abigail <abigail@delanet.com> wrote:
>Lucas Hernandez (hernal@champint.com) wrote on MMCXIII September MCMXCIII
>in <URL:news:7k3hrt$7m1$1@sneezy.strategicit.net>:
>"" I'm trying to find out how to create a html code able to call a
pearl script >"" under windows platform..
>
>You might want to ask in alt.music.blueoystercult for pearl scripts.
Hm... I would have thought alt.music.janis-joplin... :-)
--
David H. Adler - <dha@panix.com> - http://www.panix.com/~dha/
Sorry - when I booted up this morning, the 'use English' in one of my
init files failed. Am trying to compensate with 'abuse Caffeine'
before rebooting. - David Cantrell
------------------------------
Date: Tue, 15 Jun 1999 22:55:34 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: File Processing
Message-Id: <MPG.11d0dc15f1b09227989bee@nntp.hpl.hp.com>
[Posted and a courtesy copy sent.]
In article <37669e5c.44980279@news.demon.co.uk> on Tue, 15 Jun 1999
18:43:47 GMT, Dave Cross <dave@dave.org.uk> says...
> On Tue, 15 Jun 1999 08:22:21 -0700, lr@hpl.hp.com (Larry Rosler)
> wrote:
...
> > print while <FILE>;
> >
> >See how many characters that saved!
>
> Yeah, but why waste all those characters in the middle.
>
> print <FILE>;
Because my code reads and prints one line at a time, while yours slurps
the whole file into memory and then prints it. If the file is very
large, this may be either very slow or quite impossible, depending on
how much virtual memory is available.
--
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Wed, 16 Jun 1999 15:50:15 +0930
From: "Wyzelli" <wyzelli@yahoo.com>
Subject: Re: File Processing
Message-Id: <ymH93.12$E4.15259@vic.nntp.telstra.net>
Larry Rosler <lr@hpl.hp.com> wrote in message
news:MPG.11d0dc15f1b09227989bee@nntp.hpl.hp.com...
> [Posted and a courtesy copy sent.]
>
> In article <37669e5c.44980279@news.demon.co.uk> on Tue, 15 Jun 1999
> 18:43:47 GMT, Dave Cross <dave@dave.org.uk> says...
> > On Tue, 15 Jun 1999 08:22:21 -0700, lr@hpl.hp.com (Larry Rosler)
> > wrote:
> ...
> > > print while <FILE>;
> > >
> > >See how many characters that saved!
> >
> > Yeah, but why waste all those characters in the middle.
> >
> > print <FILE>;
>
> Because my code reads and prints one line at a time, while yours slurps
> the whole file into memory and then prints it. If the file is very
> large, this may be either very slow or quite impossible, depending on
> how much virtual memory is available.
>
> --
> (Just Another Larry) Rosler
> Hewlett-Packard Company
> http://www.hpl.hp.com/personal/Larry_Rosler/
> lr@hpl.hp.com
It's amazing what I can learn just by following some of these threads...
I am now off to test:-
print FILEHANDLE2 while <FILEHANDLE1>;
speaking of which, (not that we were but anyway... )
I can't seem to find an answer to a little question...
What (if any) is the correct syntax to print a 'here document' to a file
handle? Is this possible?
Wyzelli
------------------------------
Date: 15 Jun 1999 23:32:35 -0700
From: Russ Allbery <rra@stanford.edu>
Subject: Re: File Processing
Message-Id: <ylyahkvenw.fsf@windlord.stanford.edu>
Wyzelli <wyzelli@yahoo.com> writes:
> What (if any) is the correct syntax to print a 'here document' to a file
> handle? Is this possible?
Remember this simple principle: To Perl, a heredoc looks just like a
string. It's a string with a weird quoting syntax. So you print a
heredoc to a file handle exactly the same way that you'd print a string.
In other words, just like you'd say:
print FH "some string of stuff\n";
you say:
print FH <<"EOD";
some string of stuff.
EOD
Note the semicolon on the end of the print line. You do need that.
--
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print
------------------------------
Date: Wed, 16 Jun 1999 06:58:23 GMT
From: ericho@sehk.com.hk
Subject: Re: File Processing
Message-Id: <7k7huc$ckb$1@nnrp1.deja.com>
In article <7k4qro$drq$1@nnrp1.deja.com>,
chumho@my-deja.com wrote:
I think I have to apologize because I didn't express my question
clearly.
In fact, I'm NOT trying to write a program to simply print the entire
file contents to STDOUT. Otherwise, as some of you've suggested, I can
do that in one line.
What puzzled me is the difference between
local($r) = <f>;
and
local($r);
$r = <f>;
I'm pondering Bart's reply.
Eric.
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Wed, 16 Jun 1999 08:52:23 GMT
From: Gareth Rees <garethr@cre.canon.co.uk>
To: alanp@unixpower.org (Alan)
Subject: Re: Fix this uglyness
Message-Id: <sig13s34u0.fsf@cre.canon.co.uk>
Alan <alanp@unixpower.org> wrote:
> system("cat /var/log/wtmp | uuencode wtmp.`date +%m-%d` | mail $WTMPBACK");
1. You don't need `cat'.
2. Percent is a shell metacharacter.
This should have been asked in comp.unix.shell.
--
Gareth Rees
------------------------------
Date: Wed, 16 Jun 1999 09:16:10 +0100
From: "Dave Cross" <dave@dave.org.uk>
Subject: Re: How to scan a directory and put all the files and their size to a text file
Message-Id: <7k7m4b$hmo$1@starburst.uk.insnet.net>
Dariush_news wrote in message <7k6c2q$c1r$1@clio.net.metrotor.on.ca>...
>Hi Everyone;
>
>I need to scan a directory and input all the file namse in to a text file
>with thier respecitve size.
>
>Eventually I need to input this file into a excel programm and manipulate
>it.
>Does anybody have a similar script out there?
perldoc -f opendir
perldoc -f readdir
perldoc perlop
(in the last one, look for the section on the file test operators)
hth,
Dave...
------------------------------
Date: Wed, 16 Jun 1999 00:23:50 -0700
From: "Jim Bell" <jbell@263.net>
Subject: Re: how to substitute a whole paragrah in a file
Message-Id: <376726fb@nemo.idirect.com>
Sorry that I didn't read the faq carefully.
I did get some idea from it and solved the problem myself.
thanks for the pointers.
Jim
<jbell@263.net> wrote in message news:7k64af$t2e$1@nnrp1.deja.com...
| Hi,
|
| How can I substitute a paragraph in a file
| with a new paragraph?
|
| Or how can I insert a paragraph in a file?
|
| Thanks in advance!
|
| ---
| Regards,
| Jim B.
|
|
| Sent via Deja.com http://www.deja.com/
| Share what you know. Learn what you don't.
------------------------------
Date: Wed, 16 Jun 1999 15:44:38 +0930
From: "Wyzelli" <wyzelli@yahoo.com>
Subject: Re: how to substitute a whole paragrah in a file
Message-Id: <ihH93.11$E4.15445@vic.nntp.telstra.net>
Tom Christiansen <tchrist@mox.perl.com> wrote in message
news:3766b6dd@cs.colorado.edu...
> [courtesy cc of this posting mailed to cited author]
>
<snip>
> --tom
> --
> "Software is like sex: It's better when it's free." (Linus Torvalds, from
> FSF T-shirt)
> "I just found out that the brain is like a computer. If that's true,
then
> there really aren't any stupid people. Just people running Windows
That last line is one of the funniest I have seen in a while.... :^)
But doesn't that imply stupid by default??
Wyzelli (speaking for himself)
------------------------------
Date: Wed, 16 Jun 1999 08:20:45 GMT
From: lg@kt.dtu.dk (Lars Gregersen)
Subject: Re: IO::Socket, Socket
Message-Id: <37675e3d.80838221@news.dtu.dk>
On 15 Jun 1999 20:32:34 +0200, Benjamin Schweizer <SternSZ@gmx.de>
wrote:
>Hi,
>
>somebody told me to use IO::Socket instead of Socket.
>Has anybody an example for me (I need an multithreaded Server)?
See (also) the docs for IO::Select
Lars
------------------------------
Lars Gregersen (lg@kt.dtu.dk)
http://www.gbar.dtu.dk/~matlg
------------------------------
Date: 16 Jun 1999 06:18:07 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: Is it better perl than awk ?
Message-Id: <7k7fiv$3af$1@mathserv.mps.ohio-state.edu>
[A complimentary Cc of this posting was sent to Tom Christiansen
<tchrist@mox.perl.com>],
> Awk is a venerable, powerful, elegant, and simple tool that everyone
> should know. Perl is a superset and child of awk, but has much more
> power that comes at expense of sacrificing some of that simplicity.
I would think that learning awk *in addition* to Perl is an exercise
in futility. The situation may be quite different for those who know
awk already.
Ilya
------------------------------
Date: Wed, 16 Jun 1999 09:02:10 +0100
From: 'x'campbell-lange@easynet.co.uk (Rory C-L)
Subject: MacPerl newbie: installing module problem
Message-Id: <'x'campbell-lange-1606990902110001@campbell-lange.easynet.co.uk>
I am having problems understanding the installation requirements of Chris'
Mac-OSA-Simple-0.51 module.
Basically, I don't understand the requirements for installing Simple.pm.
I have placed Simple.pm in a folder called "site_perl" in the same
directory as MacPerl itself, and directed MacPerl to see the directory in
the library search path. I have run the tests below (needless to say, I
don't understand what makefile.pl is for - I don't have SDK installed).
Test.pl says that it can't find Simple.pm in @INC, and I have confirmed
this by printing out @INC.
In desperation, I also copied Simple.pm to ...:MacPerl :ext:Mac:OSA:
(which seems to be the required location from the error message), without
any luck.
>From Makefile.pl
" # On MacOS, we need to build under the Perl source directory or have the
MacPerl SDK installed in the MacPerl folder."
Second line from test.pl
"# Can't locate Mac/OSA/Simple.pm in @INC."
I'd be grateful for anyone who could help me with this beginner's question.
Best wishes
Rory
p.s.
Chris' whichMacPerl.pl gives me the following printout. Any ideas?
You're running on a PowerPC-based Mac OS system.
Checking the versions of some system files:
File Version Needed Version Present
--------------------------- -------------- ---------------
AppleScriptLib 1.2.2 1.2.2
I recommend installing the regular MacPerl distribution.
--
please remove the 'x' to reply
------------------------------
Date: Tue, 15 Jun 1999 21:45:39 -0700
From: davidk <davidk@netscape.com>
Subject: Re: net::ftp
Message-Id: <37672BF3.8A93D71@netscape.com>
no and CPAN
rach55@my-deja.com wrote:
> Quick question. Does Active Perl Build 517 include Net::FTP? If not,
> where do I find it? Thanks.
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
------------------------------
Date: Wed, 16 Jun 1999 08:19:00 GMT
From: lg@kt.dtu.dk (Lars Gregersen)
Subject: Re: Perl Server?
Message-Id: <37675dc8.80721179@news.dtu.dk>
On Tue, 15 Jun 1999 02:52:12 GMT, paul@gina.net wrote:
>I am trying to create an artificial printer out of an IP. I wiould like
>to take all files sent to an IP on a given port and simply write them to
>a file. What would the best way to do this? Use IO::Socket and listen
>for a given port? Any other suggestions?
IO::Socket and IO::Select seems a very good way to go!
Lars
------------------------------
Lars Gregersen (lg@kt.dtu.dk)
http://www.gbar.dtu.dk/~matlg
------------------------------
Date: 16 Jun 1999 07:58:01 GMT
From: Christoph Schmitz <cschmitz@stud.informatik.uni-trier.de>
Subject: Re: perlie tree
Message-Id: <7k7le9$dq1$1@fu-berlin.de>
cwt <eng80386@nus.edu.sg> wrote:
: Hallo all , below is a scripts that would go into a directory , search for
: files with a target string and write to a log file the line that the string
: occurs.
: Can anyone suggest ways to make it a recursive algorithm such that it would
: go
: into the directory and execute the process from the parent into the
: sub-directories downwards like a tree ??
: Thanks !!
You might want to read up on subroutines (man perlsub) and use
the File::Find module.
HTH,
Christoph
--
-- Christoph Schmitz <cschmitz(at)stud.informatik.uni-trier.de> --
I really hate this damned machine, I wish that they would sell it.
It never does quite what I want, but only what I tell it.
------------------------------
Date: Tue, 15 Jun 1999 21:36:13 +0200
From: Thomas Weholt <thomas@bibsyst.no>
Subject: Problems with File-module
Message-Id: <3766AB2D.C7B6E425@bibsyst.no>
Hi,
I used the File::Find to do a recursive search on a mounted cd-rom, only
to find that the module only found the first level of folders and it
didn`t dive into the folders it found at all. This happended on one cd
so far of all the cds I`ve tested ( Note! Didn`t test many. ), but it
scared me so much that I didn`t want to risk using it. It is part of a
cd-indexer package I am writing. I ended up using the ls command,
putting the contents of it into a variable, and processing it from
there, like :
use Shell qw(ls);
$listing = ls("-lash"); # the h option for ls is available in the 4.0
version of the GNU utils
# process $listing
Anybody know why this happens? Since it only happens on one disc, at
least so far, it`s probably something strange with that cd. It was
recorded using software on a Windows-platform, so it`s probably burned
using the Juliet-standard. Ls handles it perfectly so I stuck with that,
but it seems eh ... un-perl-like to depend on a command only available
in some Linux distros. and not available at all on Win32 ( Like I care
;-> ). I`m referring to the GNU Utils version 4.0.
Best regards,
Thomas Weholt,
Norway
------------------------------
Date: Wed, 16 Jun 1999 03:43:57 -0400
From: "Jody Fedor" <JFedor@datacom-css.com>
Subject: Re: Regex question
Message-Id: <7k7irk$n7l$1@plonk.apk.net>
Larry Rosler wrote in message ...
>I wouldn't even bother with a regex.
>
>substr($date, 10, 9) = ',';
>
I think Larry wins for simplicity on this one. I didn't know that $date
would be a constant length until I checked it. I thought that when it was
the 1st through 9th that there would be 1 less character in $date and I
wouldn't be able to have such an elegant and simple fix.
Thanks Larry.... your simplicity is dazzling! :-)
Jody
------------------------------
Date: Wed, 16 Jun 1999 03:33:00 -0400
From: "Jody Fedor" <JFedor@datacom-css.com>
Subject: Re: regexp trouble..
Message-Id: <7k7i75$mut$1@plonk.apk.net>
Bastiaan S van den Berg wrote in message <7k5nu7$4ea$1@zonnetje.NL.net>...
>it's supposed to look for $vars in html code and replace them with the
>actual values
>from my program
Why would you need to look for $vars in html code when perl will place what
is in the variable if you use a construct like this??
print "The answer is $results\n";
this will also work if you are outputting to a file.
print HTML "The answer is $results\n";
------------------------------
Date: Tue, 15 Jun 1999 20:02:51 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: separate file
Message-Id: <bjp6k7.p1f.ln@magna.metronet.com>
Leonid Goltser (leonid76@erols.com) wrote:
: I tried to use several files for my program. I use
: "require "filename";
: but I got message
All of the messages that perl might issue are documented
in the perldiag.pod man page that came with your perl.
You should look up your message in there...
: that says that structure does not return true.
... but when you go look in perldiag, you can't just paraphrase
the message, ya gotta use the exact text.
:-)
: What does it mean
perldiag tells what it means.
: and how to fix it?
Oh yeah. perldiag tells you how to do that too.
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Wed, 16 Jun 1999 05:42:57 GMT
From: dragnet@internalysis.com (Marc Bissonnette)
Subject: Re: this charecter @ ruined my day!!
Message-Id: <BPG93.14441$5a.17487@news20.bellglobal.com>
Keywords: Hexapodia as the key insight
In article <7k70pj$k8g$1@news1.Radix.Net>, revjack@radix.net says...
>
>Tom Christiansen explains it all:
>
>:Give up now. If you can't get at your own errors, there's really
>:very little hope.
>
>Lack of access to logs (of any kind) is more widespread than one might
>think, especially with the popularity of those quickie we-host-4-U web
>hosting companies. Anticipate more and more of these pleas.
Well, even though I have full access to my error logs (though I had to ask my
ISP to parse them out of the main logs for me) I found that installing
Activestate Perl on my win98 system at home has saved me a ton of time in
uploading scripts and trying to run them.
perl -c, perl -w and perl -d (With the debugger installed) are a life saver, as
well as sparing the readers of this group what I am sure would be colossally
stupid questions (now, you only get "just' stupid questions :) :)
Found it from www.perl.com
--
----------------------------
Marc Bissonnette
InternAlysis
Corporate Internet Research and Results!
http://www.internalysis.com
------------------------------
Date: Wed, 16 Jun 1999 04:34:20 -0400
From: "Jody Fedor" <JFedor@datacom-css.com>
Subject: Re: this charecter @ ruined my day!!
Message-Id: <7k7lq3$oqv$1@plonk.apk.net>
Brian Dodd wrote in message <3766FD3B.343A@albany.net>...
> Every time I put the @ charecter in my cgi wont run???
You need to escape the @ character with \.
Jody
------------------------------
Date: Wed, 16 Jun 1999 09:28:26 +0100
From: "Dave Cross" <dave@dave.org.uk>
Subject: Re: this charecter @ ruined my day!!
Message-Id: <7k7mrb$iis$1@starburst.uk.insnet.net>
Lucifer Bonaventure wrote in message <7k70pj$k8g$1@news1.Radix.Net>...
>
>Lack of access to logs (of any kind) is more widespread than one might
>think, especially with the popularity of those quickie we-host-4-U web
>hosting companies. Anticipate more and more of these pleas.
[snip]
>Fortunately, there *are* ways to develop and debug given only the HTTP
>protocol. How to achieve this sort of one-eyed development may already be
>a FAQ, I don't know. I'm too lazy to look.
>
>Probably has something to do with one of those module thingies.
What's wrong with installing Apache <http://www.apache.org> and ActivePerl
<http://www.activestate.com>[1] on your PC and debugging your CGI scripts
locally *before* uploading them to the server.
Dave...
[1] Actually, why not go the whole way and just install Linux?
------------------------------
Date: Tue, 15 Jun 1999 21:01:55 -0700
From: moseley@best.com (Bill)
Subject: understanding 'You need to quote "sub" at..'
Message-Id: <MPG.11d0c18a584de8ba989747@206.184.139.132>
CGI.pm (at least my versions) defines a method 'sub', which is an
unfortunate choice of names.
Perl version 5.005_02
I'm trying to understand some Perl behavior, though. Here's some test
code.
#!perl -w
use CGI qw/:standard -no_debug/;
my %SIGx;
print hidden('name','value'),
"\n",
CGI::sub('hello'),
"\n";
local $SIG{ALRM} = sub { die "timed out" };
Now, this generates the 'You need to quote "sub" at...' warning. Is
there a better way to prevent this waring than using MAIN::sub {} since
'sub' is defined in CGI.pm?
Also, why does changing the last line to
local $SIGx{ALRM} = sub { die "timed out" };
make the warning go away?
--
Bill Moseley mailto:moseley@best.com
------------------------------
Date: 16 Jun 1999 09:37:04 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: user IP
Message-Id: <37676230@newsread3.dircon.co.uk>
Leonid Goltser <leonid76@erols.com> wrote:
> I want my script can recognize IP of a user who call it.
>
I assume then you mean CGI -
<http://www.webthing.com/tutorials/cgifaq.3.html#5>
/J\
--
"Philippa Forrester, presenter and would-be Smurf" - Howard Stableford,
Tomorrow's World
------------------------------
Date: Wed, 16 Jun 1999 00:18:36 -0400
From: <joeyandsherry@mindspring.com>
Subject: using strict...
Message-Id: <7k78nk$epg$1@nntp9.atl.mindspring.net>
passme
Hello,
Thanks in advance...
I have written a great number of perl scripts and have never used a module.
I know this labels my programming, but I have done some very amazing things
(the opinion of a non-programmer), nevertheless.
So, here I go...I just read a newspost recommending the use of strict, so I
go to one of my properly running scripts and insert:
#!/usr/bin/perl -w
use strict;
When I call my script I get an Internal Server Error,so I ventured to a
utlilty that my virtual host provides, to check for common errors in perl
scripts. This is what I get:
TEST 4: perl syntax
Can't locate strict.pm in @INC (@INC contains:
/usr/lib/perl5/i686-linux/5.00404 /usr/lib/perl5
/usr/lib/perl5/site_perl/i686-linux /usr/lib/perl5/site_perl .) at
feature.pl line 2.
BEGIN failed--compilation aborted at feature.pl line 2.
So, do I just find this module on the net and upload it to the appropriate
directory, chmod it and try it again?
Thanks!
Joey
<=The Race is to the Driven, Not the Swift.=>
------------------------------
Date: Wed, 16 Jun 1999 09:32:57 +0100
From: "Dave Cross" <dave@dave.org.uk>
Subject: Re: using strict...
Message-Id: <7k7n3s$j0c$1@starburst.uk.insnet.net>
From: joeyandsherry@mindspring.com <joeyandsherry@mindspring.com>
Date: 16 June 1999 05:18
>I have written a great number of perl scripts and have never used a module.
>I know this labels my programming, but I have done some very amazing things
>(the opinion of a non-programmer), nevertheless.
>
>So, here I go...I just read a newspost recommending the use of strict, so I
>go to one of my properly running scripts and insert:
>
>#!/usr/bin/perl -w
>use strict;
>
>When I call my script I get an Internal Server Error,so I ventured to a
>utlilty that my virtual host provides, to check for common errors in perl
>scripts. This is what I get:
>
>TEST 4: perl syntax
> Can't locate strict.pm in @INC (@INC contains:
>/usr/lib/perl5/i686-linux/5.00404 /usr/lib/perl5
>/usr/lib/perl5/site_perl/i686-linux /usr/lib/perl5/site_perl .) at
>feature.pl line 2.
> BEGIN failed--compilation aborted at feature.pl line 2.
>
>So, do I just find this module on the net and upload it to the appropriate
>directory, chmod it and try it again?
strict.pm is part of the standard Perl distribution and has been for some
time. If your script can't find it, it means that someone has screwed up
your Perl installation and you should talk to the person that installed it.
Dave...
------------------------------
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 6012
**************************************