[14059] in Perl-Users-Digest
Perl-Users Digest, Issue: 1469 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Nov 23 18:10:38 1999
Date: Tue, 23 Nov 1999 15:10:25 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <943398624-v9-i1469@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Tue, 23 Nov 1999 Volume: 9 Number: 1469
Today's topics:
Initialize Variables <krishnasanjay@hotmail.com>
Re: Initialize Variables (Brett W. McCoy)
Re: Initialize Variables jlsimms@hotmail.com
Re: Initialize Variables (Greg Bacon)
Re: Initialize Variables (Greg Bacon)
Re: Initialize Variables <uri@sysarch.com>
Re: New dialect of perl: xperl (or reinventing perl, or <nandu@cimedia.com>
Re: New dialect of perl: xperl (or reinventing perl, or <lr@hpl.hp.com>
Re: New dialect of perl: xperl (or reinventing perl, or (Abigail)
Re: New dialect of perl: xperl (or reinventing perl, or <uri@sysarch.com>
newbie PERL question <news@yee.u-net.com>
Re: newbie PERL question support@gethits.com
Re: newbie PERL question (Will England)
Re: newbie PERL question <AgitatorsBand@yahoo.com>
Re: newbie PERL question <news@yee.u-net.com>
Re: newbie PERL question <jeff@vpservices.com>
Re: newbie PERL question (Craig Berry)
Re: NT to UNIX Question <jkekoni@cc.hut.fi>
Re: Opening and reading a HTML file from the web <c960334@student.dtu.dk>
Re: OT Y2K, was Re: Problematic horizontal scrollbars (Craig Berry)
Re: OT Y2K, was Re: Problematic horizontal scrollbars <news@elmbronze.demon.co.uk>
Outputting "#" in URL for anchoring ether_nut@my-deja.com
Re: Outputting "#" in URL for anchoring <webmaster@webdream.com>
Re: Outputting "#" in URL for anchoring <lr@hpl.hp.com>
Re: passing arrays by reference <aqumsieh@matrox.com>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 23 Nov 1999 18:59:36 GMT
From: Sanjay Krishna <krishnasanjay@hotmail.com>
Subject: Initialize Variables
Message-Id: <81eo6l$ale$1@nnrp1.deja.com>
I want to intialize a bunch of variables(with nothing) after they have
already been
declared. So I am using
undef($a, $b, $c, @A, @B)
This don't seem to be working in some cases. Although seperate undef
statements for each variable does. Is there an alternative ??
I am using ActiveState Perl build 5 on NT 4.0.
Thanks
Sanjay
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Tue, 23 Nov 1999 20:34:41 GMT
From: bmccoy@foiservices.com (Brett W. McCoy)
Subject: Re: Initialize Variables
Message-Id: <slrn83lunq.bke.bmccoy@moebius.foiservices.com>
Also Sprach Sanjay Krishna <krishnasanjay@hotmail.com>:
>I want to intialize a bunch of variables(with nothing) after they have
>already been
>declared. So I am using
>undef($a, $b, $c, @A, @B)
Not gonna happen. It's a unary operator.
If you have $a, @a, $B, %B, you can do typeglobbing:
undef *a;
undef *B;
Please refer to the documentation for more details.
--
Brett W. McCoy bmccoy@foiservices.com
Computer Operations Manager (Alpha Geek) http://www.foiservices.com
FOI Services, Inc./DIOGENES 301-975-0110
---------------------------------------------------------------------------
------------------------------
Date: Tue, 23 Nov 1999 21:25:55 GMT
From: jlsimms@hotmail.com
Subject: Re: Initialize Variables
Message-Id: <81f0ou$hcd$1@nnrp1.deja.com>
Instead of:
> undef($a, $b, $c, @A, @B)
why don't you use something like:
my ($a, $b, $c, @A, @B);
This should do what you want.
Jason Simms
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 23 Nov 1999 21:45:02 GMT
From: gbacon@ruby.itsc.uah.edu (Greg Bacon)
Subject: Re: Initialize Variables
Message-Id: <81f1su$1av$2@info2.uah.edu>
In article <81eo6l$ale$1@nnrp1.deja.com>,
Sanjay Krishna <krishnasanjay@hotmail.com> writes:
: I want to intialize a bunch of variables(with nothing) after they have
: already been
: declared. So I am using
: undef($a, $b, $c, @A, @B)
If you read the documentation on undef in the perlfunc manpage, you'll
see
Note that this is a unary operator, not a list operator.
This means you should use
undef $a;
undef $b;
undef $c;
undef @A;
undef @B;
instead.
Greg
--
Carrying the idea further (reductio ad absurdum? :-) C<local $$;>
would be identical to fork()...
-- Jarkko Hietaniemi
------------------------------
Date: 23 Nov 1999 21:51:15 GMT
From: gbacon@ruby.itsc.uah.edu (Greg Bacon)
Subject: Re: Initialize Variables
Message-Id: <81f28j$1av$3@info2.uah.edu>
In article <81f0ou$hcd$1@nnrp1.deja.com>,
jlsimms@hotmail.com writes:
: Instead of:
:
: > undef($a, $b, $c, @A, @B)
:
: why don't you use something like:
:
: my ($a, $b, $c, @A, @B);
What if these were already declared in the same scope? You'll get -w
spewage.
Greg
--
Speak softly and carry a +6 two-handed sword.
------------------------------
Date: 23 Nov 1999 17:25:15 -0500
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Initialize Variables
Message-Id: <x7u2mcn8vo.fsf@home.sysarch.com>
>>>>> "GB" == Greg Bacon <gbacon@ruby.itsc.uah.edu> writes:
GB> In article <81eo6l$ale$1@nnrp1.deja.com>,
GB> Sanjay Krishna <krishnasanjay@hotmail.com> writes:
GB> : undef($a, $b, $c, @A, @B)
GB> This means you should use
GB> undef $a;
GB> undef $b;
GB> undef $c;
GB> undef @A;
GB> undef @B;
don't use undef on aggregates. it does work but not in the way newbies
think. assigning () to clear aggregates is the correct solution.
if you really want to initialize all those vars in one statement use
this:
($a, $b, $c, @A, @B) = () ;
the scalar will be undef and the arrays will be empty. no -w or scoping
issues.
uri
--
Uri Guttman --------- uri@sysarch.com ---------- http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page ----------- http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net ---------- http://www.northernlight.com
------------------------------
Date: 23 Nov 1999 12:11:28 -0500
From: Nandu Shah <nandu@cimedia.com>
Subject: Re: New dialect of perl: xperl (or reinventing perl, or perl-izing jpython)
Message-Id: <m3emdh3zgf.fsf@budgie.cimedia.com>
abigail@delanet.com (Abigail) writes:
> OO is all about bondage. If you don't want that, noone is forcing you.
> Just like noone is forcing you to "use strict". But many people want
> a certain level of bondage. That's why people use "use strict". That's
> why OO languages are so popular.
[...]
> I'm sorry, but your argument doesn't hold. I detest Perl OO because
> it's neither OO, *NOR* Perl.
Maybe I didn't make myself completely clear. I'm not defending Perl
OO. What I'm saying is that that since Perl is NOT all about bondage,
what level of bondage is acceptable as Perl? This is not a rhetorical
or sarcastic question. I'm asking for your opinion.
> Whatever. I guess lots of people don't use 'my' and put all variables
> in main as well, cause it's more fun and not so restrictive as Java,
> Smalltalk or Eiffel.
You're killing me.
Nandu
------------------------------
Date: Tue, 23 Nov 1999 11:13:57 -0800
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: New dialect of perl: xperl (or reinventing perl, or perl-izing jpython)
Message-Id: <MPG.12a4874e992ffb9098a25e@nntp.hpl.hp.com>
In article <81e79g$snj$1@nnrp1.deja.com> on Tue, 23 Nov 1999 14:10:59
GMT, excalibor@my-deja.com <excalibor@my-deja.com> says...
> In article <slrn83j9cr.m2v.abigail@alexandra.delanet.com>,
> abigail@delanet.com wrote:
>
> > excalibor@my-deja.com (excalibor@my-deja.com) wrote on MMCCLXXIV
> > September MCMXCIII in <URL:news:81c10s$ain$1@nnrp1.deja.com>:
<SNIP> of worthwhile discussion of 'OO' Perl
> > {} I actually would rather have a pvm ready to digest perl-bytecoded
> > {} programs (eg. CGI scripts would start/generally work, (much?)
> faster
> >
> > There's already mod_perl that more or less does this.
>
> ah, cool... :) Then it's use should be more spread out, specially in CGI
> where server load is high and new processes are always expensive...
But mod_perl is an Apache-specific solution. I am experimenting with a
purchased product, PerlEx, from the good folks at ActiveState, which
works with other servers from (gasp!) Microsoft and Netscape. I am
using IIS 4 (commiserations welcome).
> > But that only eliminates the compiling stage, which is only worthwhile
> > for programs with a relatively very short runtime which are run often.
The compiling phase isn't the most important thing. I am using PerlEx
to make persistent connections to database servers. My Oracle/8i server
takes several seconds to make a connection, which is an eternity in
frequent CGI interactions. With PerlEx, the CGI programs run almost
instantaneously.
There are still some problems to be worked out, though. Sigh...
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: 23 Nov 1999 16:04:26 -0600
From: abigail@delanet.com (Abigail)
Subject: Re: New dialect of perl: xperl (or reinventing perl, or perl-izing jpython)
Message-Id: <slrn83m41e.m2v.abigail@alexandra.delanet.com>
Nandu Shah (nandu@cimedia.com) wrote on MMCCLXXV September MCMXCIII in
<URL:news:m3emdh3zgf.fsf@budgie.cimedia.com>:
?? abigail@delanet.com (Abigail) writes:
??
?? > OO is all about bondage. If you don't want that, noone is forcing you.
?? > Just like noone is forcing you to "use strict". But many people want
?? > a certain level of bondage. That's why people use "use strict". That's
?? > why OO languages are so popular.
?? [...]
?? > I'm sorry, but your argument doesn't hold. I detest Perl OO because
?? > it's neither OO, *NOR* Perl.
??
?? Maybe I didn't make myself completely clear. I'm not defending Perl
?? OO. What I'm saying is that that since Perl is NOT all about bondage,
?? what level of bondage is acceptable as Perl? This is not a rhetorical
?? or sarcastic question. I'm asking for your opinion.
When it comes to OO, I don't really care whether you *can* to an objects
or your inheritees variables. But you shouldn't be trampling on it by
default.
Again, a comparison with non-OO Perl:
package foo;
$scalar = 3;
package bar;
$scalar = 17;
package foo;
print $scalar; # Prints 3.
Sure, from package bar you can change $scalar in package foo. But it is
*not* the default, and you do *not* have to do extra work to avoid
accidently overwriting data outside of your logical unit. You have to do
work to overwrite such data - a willingly act.
package bar;
$foo::scalar = 17;
Enough evidence to smack the programmer with a 2x4 and cut off its fingers.
You've probably heard:
Perl does not enforce private and public parts of its modules as you may
have been used to in other languages like C++, Ada, or Modula-17. Perl
doesn't have an infatuation with enforced privacy. It would prefer
that you stayed out of its living room because you weren't invited, not
because it has a shotgun.
With OO perl, there's just one living room for each object. The entire
tree of inherited classes all share the same livingroom. There's no
concept of data encapsulation unless everyone from the very beginning
did it's best to build brick walls. Which will only work if all of them
use the same bricks and mortar. But that means you have to plan ahead,
and anticipate possible future uses. And reusers of your class will have
to play by your rules - your implementation will be an essential part of
the interface, and a lot harder to mask than method masking.
One of the points of OO is data encapsulation and implementation hiding.
The first one is possible, by using enough tricks. The latter one isn't.
One of the slogans of Perl is "making easy things easy, and hard things
possible". I propose as a slogan for OO-Perl: "making some easy things
hard, and others impossible".
About the only positive thing OO-Perl gives you is the '->' syntax, so
our pet language can look cool, just like Java and C++. (That doesn't
imply I think Java and C++ have perfect OO).
Abigail
--
sub camel (^#87=i@J&&&#]u'^^s]#'#={123{#}7890t[0.9]9@+*`"'***}A&&&}n2o}00}t324i;
h[{e **###{r{+P={**{e^^^#'#i@{r'^=^{l+{#}H***i[0.9]&@a5`"':&^;&^,*&^$43##@@####;
c}^^^&&&k}&&&}#=e*****[]}'r####'`=437*{#};::'1[0.9]2@43`"'*#==[[.{{],,,1278@#@);
print+((($llama=prototype'camel')=~y|+{#}$=^*&[0-9]i@:;`"',.| |d)&&$llama."\n");
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: 23 Nov 1999 17:10:28 -0500
From: Uri Guttman <uri@sysarch.com>
Subject: Re: New dialect of perl: xperl (or reinventing perl, or perl-izing jpython)
Message-Id: <x7yabon9kb.fsf@home.sysarch.com>
>>>>> "LR" == Larry Rosler <lr@hpl.hp.com> writes:
>> > There's already mod_perl that more or less does this.
>>
>> ah, cool... :) Then it's use should be more spread out, specially in CGI
>> where server load is high and new processes are always expensive...
LR> But mod_perl is an Apache-specific solution. I am experimenting with a
LR> purchased product, PerlEx, from the good folks at ActiveState, which
LR> works with other servers from (gasp!) Microsoft and Netscape. I am
LR> using IIS 4 (commiserations welcome).
LR> The compiling phase isn't the most important thing. I am using PerlEx
LR> to make persistent connections to database servers. My Oracle/8i server
LR> takes several seconds to make a connection, which is an eternity in
LR> frequent CGI interactions. With PerlEx, the CGI programs run almost
LR> instantaneously.
check out fastcgi as well. it is an open protocol, it is free with
apache, is supported commercially for netscape and redmondware by fast
engines, and other servers support it too. it gives you persistancy and
saves on the compiles as well as allowing remote execution of the cgi
programs. go to fastcgi.com for more info.
uri
--
Uri Guttman --------- uri@sysarch.com ---------- http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page ----------- http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net ---------- http://www.northernlight.com
------------------------------
Date: Tue, 23 Nov 1999 19:35:13 -0000
From: "Jonathan Yee" <news@yee.u-net.com>
Subject: newbie PERL question
Message-Id: <B1C_3.779$Sn.101853@newsr2.u-net.net>
Hi,
Someone has written some scripts for me but I need to edit them slightly.
Do you use a program to write Perl scripts? Could you tell me what is
called, where I can find it please? I have been told by my ISP that I need
to save my PERL scripts in UNIX format. Does anyone know how to make them
executable when I upload them.
Thanks
Jonathan
------------------------------
Date: Tue, 23 Nov 1999 19:43:05 GMT
From: support@gethits.com
Subject: Re: newbie PERL question
Message-Id: <383B95BA.80577778@gethits.com>
Jonathan:
You need more help than a newsgroup can offer. Start at
http://language.perl.com/faq/
Blessings,
Darryl Dyck
Jonathan Yee wrote:
>
> Hi,
>
> Someone has written some scripts for me but I need to edit them slightly.
> Do you use a program to write Perl scripts? Could you tell me what is
> called, where I can find it please? I have been told by my ISP that I need
> to save my PERL scripts in UNIX format. Does anyone know how to make them
> executable when I upload them.
>
> Thanks
>
> Jonathan
------------------------------
Date: Tue, 23 Nov 1999 20:04:52 GMT
From: will@mylanders.com (Will England)
Subject: Re: newbie PERL question
Message-Id: <slrn83ltg0.h88.will@mylanders.com>
On Tue, 23 Nov 1999 19:35:13 -0000, Jonathan Yee <news@yee.u-net.com> wrote:
>Hi,
>
>Someone has written some scripts for me but I need to edit them slightly.
>Do you use a program to write Perl scripts? Could you tell me what is
>called, where I can find it please? I have been told by my ISP that I need
>to save my PERL scripts in UNIX format. Does anyone know how to make them
>executable when I upload them.
Perl scripts are text files. Use what you'd use to edit a text file. Say,
Notepad. Or Vi. Or Emacs. Your choice, really. Whatever you like best.
Regarding UNIX format, when you FTP them back to your ISP, the FTP program
will convert them to UNIX format, assuming you have ASCII transfer set.
Regarding execuatblity, you'll need to telnet to the server first. Then,
change to the appropriate directory and use the chmod command. Don't know
what that is? Try 'man chmod' for some info.
If this is all above your skill level, start with a novice-level book on
UNIX from your friendly library.
Will
--
"If Al Gore invented the Internet, then I invented spellcheck!"
Dan Quayle, quoted at the National Press Club, 8/3/1999
Recovery page: http://will.mylanders.com/ will@mylanders.com
------------------------------
Date: Tue, 23 Nov 1999 20:12:07 GMT
From: Scratchie <AgitatorsBand@yahoo.com>
Subject: Re: newbie PERL question
Message-Id: <ryC_3.684$Vg2.146994@news.shore.net>
Jonathan Yee <news@yee.u-net.com> wrote:
: Someone has written some scripts for me but I need to edit them slightly.
: Do you use a program to write Perl scripts? Could you tell me what is
: called, where I can find it please?
You can use any text editor.
: I have been told by my ISP that I need
: to save my PERL scripts in UNIX format.
That, or ftp them in ASCII mode.
: Does anyone know how to make them
: executable when I upload them.
Typically with "chmod 755 <script name here>". If you're doing it through
an ftp client you usually do "site chmod..." The exact permissions may
vary depending on your needs; for more information on file permissions,
check a beginners' book on Unix (the one from O'Reilly is good).
Hope this helps,
--Art
--
--------------------------------------------------------------------------
National Ska & Reggae Calendar
http://www.agitators.com/calendar/
--------------------------------------------------------------------------
------------------------------
Date: Tue, 23 Nov 1999 20:21:59 -0000
From: "Jonathan Yee" <news@yee.u-net.com>
Subject: Re: newbie PERL question
Message-Id: <tJC_3.785$Sn.102229@newsr2.u-net.net>
Thanks for all the (very quick) help everyone. It has been quite helpful,
but I think I have done something wrong and one of the scripts have stopped
working :-( Perhaps it would be best if I leave it to the experts!
Jonathan
Jonathan Yee <news@yee.u-net.com> wrote in message
news:B1C_3.779$Sn.101853@newsr2.u-net.net...
> Hi,
>
> Someone has written some scripts for me but I need to edit them slightly.
> Do you use a program to write Perl scripts? Could you tell me what is
> called, where I can find it please? I have been told by my ISP that I
need
> to save my PERL scripts in UNIX format. Does anyone know how to make them
> executable when I upload them.
>
> Thanks
>
> Jonathan
>
>
------------------------------
Date: 23 Nov 1999 20:24:16 GMT
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: newbie PERL question
Message-Id: <383AF79A.58078D22@vpservices.com>
Jonathan Yee wrote:
> Newsgroups: alt.comp.perlcgi.freelance, alt.perl, comp.lang.perl.misc
It's kind of overkill to post the same question to three newsgroups,
even if some of them don't exist.
> Someone has written some scripts for me but I need to edit them slightly.
Well, that can be a good way to start learning Perl, but I hope you
trust that other person pretty well because that can also be a good way
to get in a lot of trouble if you start using scripts without knowing
how or why they work.
> Do you use a program to write Perl scripts?
Any text editor or word-processor capable of saving in plain text
format. I use emacs myself. Since you are on windoze (or at least
posting from a windoze machine) -- emacs is available for windoze but
Notepad or WordPad might be easier for you.
> I have been told by my ISP that I need to save my PERL scripts in UNIX format.
If you are editing in windoze, the file will have different line and
file ending characters but usually that can be fixed automatically by
using an FTP program that sets the format when you upload in text mode.
If not, most Unixen have a program called dos2unix.
> Does anyone know how to make them executable when I upload them.
Look up the chmod command (type "man chmod" at the UNIX prompt). "chmod
a+x filename" works in most situations. Also check with your ISP to see
if they need to be in a specific location.
--
Jeff
------------------------------
Date: Tue, 23 Nov 1999 22:03:34 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: newbie PERL question
Message-Id: <s3m3pmbrrrp67@corp.supernews.com>
Jonathan Yee (news@yee.u-net.com) wrote:
: Someone has written some scripts for me but I need to edit them
: slightly.
Cool, doing that is one good way to learn Perl. You might want to have a
good introductory book handy (I recommend the Llama) so you'll understand
some of what you're doing.
: Do you use a program to write Perl scripts?
Perl scripts are plain text; you can edit them using any text editor.
Beware of using word processors, which will insert a bunch of formatting
codes and the like if you're not careful. Plain old Windows Notepad works
fine, or vi, or Emacs, or PFE, or anything else which can edit plain text.
: I have been told by my ISP that I need to save my PERL scripts in UNIX
: format.
If you are using FTP to upload the files, just make sure to do so in ASCII
mode. This will automagically transform them from DOS to UNIX text format
while in transit.
: Does anyone know how to make them executable when I upload them.
Some FTP tools allow you to change the access flags on remote files. If
you can get access to a Unix shell prompt, 'chmod 755 myfile' will do the
trick.
--
| Craig Berry - cberry@cinenet.net
--*-- http://www.cinenet.net/users/cberry/home.html
| "They do not preach that their God will rouse them
a little before the nuts work loose." - Kipling
------------------------------
Date: 23 Nov 1999 19:54:03 GMT
From: Joonas Timo Taavetti Kekoni <jkekoni@cc.hut.fi>
Subject: Re: NT to UNIX Question
Message-Id: <81ercr$362v$1@midnight.cs.hut.fi>
Zachar <zzawadzki@my-deja.com> wrote:
: If I develop a product under NT (Perl for NT, Sybase for NT and
: SybaseDBI for NT) do I need to make any significant changes before I can
: use the Perl code under UNIX?
1. Case sensitivity and
2. unix automatically globs argv and system things.
--
_- Joonas Kekoni OH2MTF I -_
_-internet: jkekoni@cc.hut.fi I DO NOT EAT. -_
_-slowmail: j{mer{ntaival 7a176 I -_
_- 02150Espoo I It is a monitor -_
_- Finland/Europe I -_
------------------------------
Date: Tue, 23 Nov 1999 18:16:29 +0100
From: Andrass Ziska Davidsen <c960334@student.dtu.dk>
Subject: Re: Opening and reading a HTML file from the web
Message-Id: <383ACBEC.F4B890BA@student.dtu.dk>
--------------0EDB11E0951AA98425A27997
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
I have found the solution.
So no need to answer this thread!
Andrass Ziska Davidsen wrote:
> I would like to open a file located on the web, and read it as text.
> The actual parsing of the file I think I can manage, but getting the
> file itself is not obvious to me. I have tried to look at LWP::Simple
> and HTTP::Request, but nothing in there seems to work.
>
> On the system, these modules are not included, so I have installed
> them onto a personal directory: ~/usr_bin/perlmod. But I have some
> problems with the use/require call. (It returns something about not
> found in @INC). I have also tried to include following line in my
> script, but then get some other error messages, the line was:
> BEGIN {push(@INC, "/gbar/newton/home4/c96/c960334/usr_bin/perlmod")
> ;}
>
> Is there anybody, who can help me with this.
>
> Thanks in advance.
>
> regards
>
> andrass
>
>
> --
> ---oooOOOooo---
> Andrass Ziska Davidsen
> Fogedmarken 12, 2th
> DK-2200 København N
> DENMARK
> cellular (+45) 28 14 49 99
> URL1 http://www.gbar.dtu.dk/~c960334
> e-mail mailto:c960334@student.dtu.dk
> DTU-stud.no.: c960334
>
>
--
---oooOOOooo---
Andrass Ziska Davidsen
Fogedmarken 12, 2th
DK-2200 København N
DENMARK
cellular (+45) 28 14 49 99
URL1 http://www.gbar.dtu.dk/~c960334
e-mail mailto:c960334@student.dtu.dk
DTU-stud.no.: c960334
--------------0EDB11E0951AA98425A27997
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
I have found the solution.
<p>So no need to answer this thread!
<br>
<br>
<p>Andrass Ziska Davidsen wrote:
<blockquote TYPE=CITE>I would like to open a file located on the web, and
read it as text. The actual parsing of the file I think I can manage, but
getting the file itself is not obvious to me. I have tried to look at LWP::Simple
and <a href="HTTP::Request">HTTP::Request</a>, but nothing in there
seems to work.
<p>On the system, these modules are not included, so I have installed them
onto a personal directory: ~/usr_bin/perlmod. But I have some problems
with the use/require call. (It returns something about not found in @INC).
I have also tried to include following line in my script, but then get
some other error messages, the line was:
<br> BEGIN {push(@INC, "/gbar/newton/home4/c96/c960334/usr_bin/perlmod")
;}
<p>Is there anybody, who can help me with this.
<p>Thanks in advance.
<p>regards
<p>andrass
<br>
<pre>--
---oooOOOooo---
Andrass Ziska Davidsen
Fogedmarken 12, 2th
DK-2200 København N
DENMARK
cellular (+45) 28 14 49 99
URL1 <a href="http://www.gbar.dtu.dk/~c960334">http://www.gbar.dtu.dk/~c960334
</a>e-mail <a href="mailto:c960334@student.dtu.dk">mailto:c960334@student.dtu.dk
</a>DTU-stud.no.: c960334</pre>
</blockquote>
<pre>--
---oooOOOooo---
Andrass Ziska Davidsen
Fogedmarken 12, 2th
DK-2200 København N
DENMARK
cellular (+45) 28 14 49 99
URL1 <A HREF="http://www.gbar.dtu.dk/~c960334">http://www.gbar.dtu.dk/~c960334</A>
e-mail <A HREF="mailto:c960334@student.dtu.dk">mailto:c960334@student.dtu.dk</A>
DTU-stud.no.: c960334</pre>
</html>
--------------0EDB11E0951AA98425A27997--
------------------------------
Date: Tue, 23 Nov 1999 17:40:56 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: OT Y2K, was Re: Problematic horizontal scrollbars
Message-Id: <s3lkd8airrp24@corp.supernews.com>
Mark-Jason Dominus (mjd@op.net) wrote:
: In article <81c5h8$r2$1@internal-news.uu.net>,
: Erik van Roode <newsposter@cthulhu.demon.nl> wrote:
: > I assume that people that don't read localtime documentation
: >also haven't found the address for the perl5-porters mailing list.
:
: Just as a data point, it appears that at present P5P has gotten a
: report of this type every two to three weeks this year.
Sounds like it's about time you lazy slackers fixed the dang thing
already.
--
| Craig Berry - cberry@cinenet.net
--*-- http://www.cinenet.net/users/cberry/home.html
| "They do not preach that their God will rouse them
a little before the nuts work loose." - Kipling
------------------------------
Date: Tue, 23 Nov 1999 20:49:45 +0000
From: Dave Eastabrook <news@elmbronze.demon.co.uk>
Subject: Re: OT Y2K, was Re: Problematic horizontal scrollbars
Message-Id: <UOnSvVAp3vO4Ew7X@elmbronze.demon.co.uk>
on Tue, 23 Nov 1999 Jonathan Stowe <gellyfish@gellyfish.com> wrote
>
>I'm sure you are right - however my amusement is largely due to the fact
>that the head line for this page on your Y2k links page is:
>
> "Perl and JavaScript doomed"
Hmmm, I really must change that ... done
"Scriptkiddy clients doomed"
>I really dont understand what you are talking about - I will take it as an
>insult.
ROTFL. It's a fair cop, guv :) Teach me to get to bed earlier.
:Dave
------------------------------
Date: Tue, 23 Nov 1999 17:45:53 GMT
From: ether_nut@my-deja.com
Subject: Outputting "#" in URL for anchoring
Message-Id: <81ejse$77g$1@nnrp1.deja.com>
How do you get the # in the URL sequence to output as printed "#" and
also include what is to the right of it? I'm trying to use anchoring in
output in the perl script as exceptions.
Thanks for your help-
if ($test eq 'test1')
{
print "<FORM METHOD=\"GET\" ACTION=\"http://www.my
domain.com/Coming_Soon/index.html#AZ\">\n";
print "<li><b><i> Search results<br></b></i>\n";
print "<input type=\"SUBMIT\" value=\"click here\">\n";
print " </form></b></i>\n";
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Tue, 23 Nov 1999 19:24:41 GMT
From: "Craig Vincent" <webmaster@webdream.com>
Subject: Re: Outputting "#" in URL for anchoring
Message-Id: <ZRB_3.580$bE1.641@198.235.216.4>
> How do you get the # in the URL sequence to output as printed "#" and
> also include what is to the right of it? I'm trying to use anchoring in
> output in the perl script as exceptions.
> if ($test eq 'test1')
> {
> print "<FORM METHOD=\"GET\" ACTION=\"http://www.my
> domain.com/Coming_Soon/index.html#AZ\">\n";
> print "<li><b><i> Search results<br></b></i>\n";
> print "<input type=\"SUBMIT\" value=\"click here\">\n";
> print " </form></b></i>\n";
Have you tried escaping the #?
<snip>
domain.com/Coming_Soon/index.html\#AZ\">\n";
</snip>
--
Sincerely,
Craig Vincent
Senior Webmaster/Programmer
Web Dream Inc.
------------------------------
Date: Tue, 23 Nov 1999 11:48:39 -0800
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: Outputting "#" in URL for anchoring
Message-Id: <MPG.12a48f71e55c346998a260@nntp.hpl.hp.com>
In article <ZRB_3.580$bE1.641@198.235.216.4> on Tue, 23 Nov 1999
19:24:41 GMT, Craig Vincent <webmaster@webdream.com> says...
> > How do you get the # in the URL sequence to output as printed "#" and
> > also include what is to the right of it? I'm trying to use anchoring in
> > output in the perl script as exceptions.
> > if ($test eq 'test1')
> > {
> > print "<FORM METHOD=\"GET\" ACTION=\"http://www.my
> > domain.com/Coming_Soon/index.html#AZ\">\n";
> > print "<li><b><i> Search results<br></b></i>\n";
> > print "<input type=\"SUBMIT\" value=\"click here\">\n";
> > print " </form></b></i>\n";
>
> Have you tried escaping the #?
>
> <snip>
> domain.com/Coming_Soon/index.html\#AZ\">\n";
> </snip>
Gasp, splutter, groan!
What possible difference can 'escaping the #' make, when '#' has no
metacharacter status within a string literal?
Neither you nor the original poster seem able to test code before
posting it. Craig also is unaware of alternate quoting syntax or the
use of 'here-documents', so he doesn't need to escape any of the double-
quotes and doesn't have to use a host of print statements where one
would do just fine.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Tue, 23 Nov 1999 13:49:20 -0500
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: passing arrays by reference
Message-Id: <x3yn1s511sf.fsf@tigre.matrox.com>
"Cory Aitchison" <caitchison@hotmail.com> writes:
> I would like to be able to pass an array by reference to a function, assign
> an array reference to the passed reference and be able to manipulate the
> array. Is this possible. Belo is some code that attemps to clarify my
> problem.
Yes. Did you read the following docs:
perlref
perllol
perldsc
?? If not, then go ahead and do that before you venture any further.
> use strict;
>
> my @array = qw (0 1 2 3 4 5 6);
>
> modify (\@array);
>
> sub modify {
>
> my $tempArrayAddress = $_[0];
> my @tempArray;
>
> \@tempArray = $tempArrayAddress;
This doesn't do what you think. You can just manipulate
$tempArrayAddress immediately (see below).
> print \@tempArray . " " . $tempArrayAddress . "\n";
>
> $tempArray[1] = 9999999;
Change that to:
$tempArrayAddress->[1] = 9999999;
> }
>
> print @array;
>
> When the last print @array executes the array is unchanged. Any
> insights?
Read more docs. There is no excuse for not doing so.
HTH,
--Ala
------------------------------
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 1469
**************************************