[16493] in Perl-Users-Digest
Perl-Users Digest, Issue: 3905 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Aug 3 18:15:42 2000
Date: Thu, 3 Aug 2000 15:15:29 -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: <965340929-v9-i3905@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Thu, 3 Aug 2000 Volume: 9 Number: 3905
Today's topics:
How to open and append to a file <c-stone@att.net>
Re: How to open and append to a file (Greg Bacon)
Re: How to open and append to a file (Abigail)
Re: How to show "tail -f" in browser <patrick.vogt@unibas.ch>
http login & password script? Dennis@nospam.com
Re: http login & password script? <tony_curtis32@yahoo.com>
I need a Perl developer <EPICSTAFFING@EMAIL.COM>
ICE information and content exchange protocol <Herbert.Liechti@thinx.ch>
Re: Interpolating strings--special characters, _not_ va <psmith@baynetworks.com>
Re: Is Learning Perl worth buying? <lr@hpl.hp.com>
Move or Rename Permission Denied <9jerry9@my-deja.com>
Re: Need to read a html page and save it via perl Unabl <kensplace@comport.com>
Re: Need to read a html page and save it via perl Unabl <kensplace@comport.com>
Re: Need to read a html page and save it via perl Unabl <kensplace@comport.com>
Re: Need to read a html page and save it via perl Unabl <kensplace@comport.com>
Re: Need to read a html page and save it via perl Unabl <kensplace@comport.com>
Re: Need to read a html page and save it via perl Unabl (Abigail)
Net::IRC - kicking users <adam@netsetdesign.com>
Re: Newbie needs memory <tim@ipac.caltech.edu>
Re: outputting a CGI script to another frame? <jeff@yoak.com>
Re: pattern matching across two lines <aqumsieh@hyperchip.com>
Re: pattern matching across two lines (Abigail)
Perl CGI Problems <robinson_p@btconnect.com>
Problems with installing Win32-api module <dshtern@pixo.com>
Re: Queastion about CGI.pm sticky values <care227@attglobal.net>
Re: regex split <aqumsieh@hyperchip.com>
Re: regex split <john@nomailplease>
Re: regex split <care227@attglobal.net>
Re: regex split <aqumsieh@hyperchip.com>
Re: regex split <aqumsieh@hyperchip.com>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 03 Aug 2000 18:58:19 GMT
From: "Chris Stone" <c-stone@att.net>
Subject: How to open and append to a file
Message-Id: <fhji5.3583$gW5.182419@bgtnsc04-news.ops.worldnet.att.net>
I'm trying to write a guestbook script that will log each entry on top of
all existing entries. I'm pretty new to CGI programming, so I'm not sure how
this is done. I'm not very familiar with the 'open' and '>>' command, but as
I understand '>>' will write to the bottom of the file. But how would I
write to the top of the file, yet below the opening HTML tags (assuming the
file being changed is an HTML file)?
Thanks,
Chris
------------------------------
Date: Thu, 03 Aug 2000 19:09:37 GMT
From: gbacon@HiWAAY.net (Greg Bacon)
Subject: Re: How to open and append to a file
Message-Id: <sojgrhmsdbm177@corp.supernews.com>
In article <fhji5.3583$gW5.182419@bgtnsc04-news.ops.worldnet.att.net>,
Chris Stone <c-stone@att.net> wrote:
: I'm trying to write a guestbook script that will log each entry on top of
: all existing entries. I'm pretty new to CGI programming, so I'm not sure how
: this is done. I'm not very familiar with the 'open' and '>>' command, but as
: I understand '>>' will write to the bottom of the file. But how would I
: write to the top of the file, yet below the opening HTML tags (assuming the
: file being changed is an HTML file)?
There's an entire section of the Perl FAQ devoted to Files. Your
question is a FAQ, so find your answer in the Perl FAQ.
Greg
--
I use Perl, Emacs, and zsh. All easy simple tools with nary a feature
to remember.
-- Jarkko Hietaniemi
------------------------------
Date: 03 Aug 2000 21:57:09 GMT
From: abigail@foad.org (Abigail)
Subject: Re: How to open and append to a file
Message-Id: <slrn8ojqks.io6.abigail@alexandra.foad.org>
Chris Stone (c-stone@att.net) wrote on MMDXXIX September MCMXCIII in
<URL:news:fhji5.3583$gW5.182419@bgtnsc04-news.ops.worldnet.att.net>:
|| I'm trying to write a guestbook script that will log each entry on top of
|| all existing entries. I'm pretty new to CGI programming, so I'm not sure how
|| this is done. I'm not very familiar with the 'open' and '>>' command, but as
|| I understand '>>' will write to the bottom of the file. But how would I
|| write to the top of the file, yet below the opening HTML tags (assuming the
|| file being changed is an HTML file)?
Guess what? That's discussed in the FAQ.
Read it and learn.
Abigail
--
perl -wleprint -eqq-@{[ -eqw+ -eJust -eanother -ePerl -eHacker -e+]}-
------------------------------
Date: Thu, 3 Aug 2000 23:15:51 +0200
From: Patrick Vogt <patrick.vogt@unibas.ch>
Subject: Re: How to show "tail -f" in browser
Message-Id: <3989df85.0@maser.urz.unibas.ch>
Matthias Oswald wrote:
> Hi,
>
> I am developing a user inferface based on a HTML page and the processing
>
> behind in perl/ksh script.
>
> Is there a convenient way to show the log of the processing in the
> browser ?
> I was thinking of doing a tail -f on the process log file and show it
> somehow in another frame of the browser.
> Maybe someone has an example?
Probably you best do it in HTML, the following code will call tail.cgi
every 9 seconds.
<HEAD>
<meta http-equiv="refresh" content="9;URL=/cgi/tail.cgi">
</HEAD>
Hope this helps,
Patrick
> Your help is much appreciated.
>
> Thanks,
> Matthias Oswald
> email: moswald@husky.ca, mabios@t-online.de
>
------------------------------
Date: Thu, 03 Aug 2000 13:02:43 -0500
From: Dennis@nospam.com
Subject: http login & password script?
Message-Id: <9qcjoss0cps9trus2o1mfmuhi2j5rjhb0u@4ax.com>
Where can I find documentation and/or script on how to login to a http site with
a username and password using one of the HTTP:: modules?
I did a search of CPAN but came up empty.
TIA for any help you can give me.
Dennis Meyers
dennisATmeyersanalytics.com
------------------------------
Date: 03 Aug 2000 13:18:45 -0500
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: http login & password script?
Message-Id: <87punq6we2.fsf@limey.hpcc.uh.edu>
>> On Thu, 03 Aug 2000 13:02:43 -0500,
>> Dennis@nospam.com said:
> Where can I find documentation and/or script on how to
> login to a http site with a username and password using
You mean "authenticate", not "login", here.
> one of the HTTP:: modules?
You want the LWP modules.
perldoc LWP::UserAgent
perldoc lwpcook
which interact with the HTTP:: modules, e.g.
perldoc HTTP::Request
hth
t
--
"With $10,000, we'd be millionaires!"
Homer Simpson
------------------------------
Date: Thu, 3 Aug 2000 16:24:10 -0500
From: "EPIC" <EPICSTAFFING@EMAIL.COM>
Subject: I need a Perl developer
Message-Id: <COli5.138$xp4.21251@news1.primary.net>
I am looking for a Perl developer, with Apache, Linux, My SQL development
skills to help me build a website.
If you are available for sidework please drop me a line.
Thanks Tom
------------------------------
Date: Thu, 03 Aug 2000 22:13:15 +0200
From: Herbert Liechti <Herbert.Liechti@thinx.ch>
Subject: ICE information and content exchange protocol
Message-Id: <3989D25B.7BF9A4EA@thinx.ch>
Hello
I'm currently involved in a project where we have to deliver XML content over
the ICE (information and content exchange protocol
[http://www.oasis-open.org/cover/ice.html]). Of course this is done
with perl. I read the various documents
and I wonder if there is a implementation in Perl for the ICE
protocol available.
Thanks for helping
Herbie
------------------------------
Date: 03 Aug 2000 14:50:20 -0400
From: "Paul D. Smith" <psmith@baynetworks.com>
Subject: Re: Interpolating strings--special characters, _not_ variables
Message-Id: <p5hf92kwlv.fsf@nortelnetworks.com>
%% Ilmari Karonen <iltzu@sci.invalid> writes:
ik> I just recently wrote a module to do what you want. It's not on CPAN
ik> yet, as it's not quite finished, but you can download it from:
ik> http://www.sci.fi/~iltzu/Text-Substitute.pm
ik> The interpolate() function is still buggy, but substitute(), which
ik> does what you want, should work fine.
Thanks, I'll check it out.
ik> Just say "NO" to eval.
Why?
--
-------------------------------------------------------------------------------
Paul D. Smith <psmith@baynetworks.com> Network Management Development
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist
-------------------------------------------------------------------------------
These are my opinions---Nortel Networks takes no responsibility for them.
------------------------------
Date: Thu, 3 Aug 2000 11:01:59 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: Is Learning Perl worth buying?
Message-Id: <MPG.13f3536da3e3cfe698ac30@nntp.hpl.hp.com>
In article <LYdi5.10121$f_5.52873@news1.rdc1.ct.home.com> on Thu, 03 Aug
2000 12:55:07 GMT, Decklin Foster <decklin+usenet@red-bean.com> says...
> john_s_brown@my-deja.com <john_s_brown@my-deja.com> writes:
>
> > 1. Learning Perl (2nd edition) is all about Perl 5, and I have
> > installed Perl 5.6 on my machine! Do those Perl 5 tricks presented in
> > Learning Perl book work with Perl version 6.5?
...
> I'm also influenced a bit by the fact that there are no spelling or
> grammatical errors in your post, which makes you look a bit more
> intelligent that the typical poster here. ;-)
Nevertheless, there is a significant typo, isn't there?
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Thu, 03 Aug 2000 21:43:00 GMT
From: Jerry Leventer <9jerry9@my-deja.com>
Subject: Move or Rename Permission Denied
Message-Id: <8mcp13$fcu$1@nnrp1.deja.com>
On Win NT4, perl 5.6.0 b615 I'm encountering an elusive problem
trying to move a file to another directory on the same file system. I've
tried 'File::Copy::move', 'rename', & 'copy / unlink'. In all cases I
get a 'Permissions Denied' error.
I know it is a problem in my script because when I create a 'test.pl'
stripped down version of the code, it works fine. However, in my full
version script, I can't make it work at all even when I hard code the
path strings!
Here is some of the code that seems relevant.
# -------- Code Portion ----------------------------------
#!/perl/bin/perl.exe
use Net::SMTP ;
use File::Copy ;
use Cwd ;
# Main: Global Declarations
my $EMAIL_DIR = "D:/somedir" ;
my $DONE_DIR = "$EMAIL_DIR/done" ;
&processRequest() ;
sub processRequest
{
opendir (DIR1, $EMAIL_DIR) or die ;
my @files = readdir (DIR1) ;
closedir DIR1 ;
foreach (<@files>) {
$myFile = "$EMAIL_DIR/$_" ;
next if (-d "$myFile") ;
open EFILE, "$myFile" or die ;
... process the data ...
close EFILE ;
# MOVE THE FILE NOW
# -----------------
move ($myFile, $DONE_DIR) or die "$!" ; # Permissions denied
}
Your ideas are appreciated.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Thu, 3 Aug 2000 20:26:51 +0100
From: "ken" <kensplace@comport.com>
Subject: Re: Need to read a html page and save it via perl Unable to Use LWP
Message-Id: <8mch0t$9r$1@news6.svr.pol.co.uk>
Thanks, duly noted for future reference!
Actually i found a new host, prohosting.com
(another free one) that works ok with the lwp
so to keep things simple for now im doing it on there,
but its always best to know how to do things the real way!
Tim Cockle wrote in message <398861CC.71D6A7B2@staffs.ac.uk>...
>If you want to download and save a file it is fairly simple.
>
>You need to
>1 open a socket to the local proxy or to the original web sever
>2 make request i.e. print $socket 'GET $url HTTP/1.0';
>3 read the response to a file i.e while (<$socket>) {print $file $)};
>
>If you don't want the HTTP headers then before step 3 insert:
>
> while(<$socket>) {
> if ($_ =~ /^[\s\x00]*$/) {
> last;
> }
> }
>
>ken wrote:
>
>> any suggestions on how to read a url, and save the page to a file
>> can be accomplished without the use of the lwp module (virtualave have
not
>> installed that)
>> ?
>>
>> Thanks for any help
>
------------------------------
Date: Thu, 3 Aug 2000 20:26:59 +0100
From: "ken" <kensplace@comport.com>
Subject: Re: Need to read a html page and save it via perl Unable to Use LWP
Message-Id: <8mch14$9u$1@news6.svr.pol.co.uk>
Thanks, duly noted for future reference!
Actually i found a new host, prohosting.com
(another free one) that works ok with the lwp
so to keep things simple for now im doing it on there,
but its always best to know how to do things the real way!
Tim Cockle wrote in message <398861CC.71D6A7B2@staffs.ac.uk>...
>If you want to download and save a file it is fairly simple.
>
>You need to
>1 open a socket to the local proxy or to the original web sever
>2 make request i.e. print $socket 'GET $url HTTP/1.0';
>3 read the response to a file i.e while (<$socket>) {print $file $)};
>
>If you don't want the HTTP headers then before step 3 insert:
>
> while(<$socket>) {
> if ($_ =~ /^[\s\x00]*$/) {
> last;
> }
> }
>
>ken wrote:
>
>> any suggestions on how to read a url, and save the page to a file
>> can be accomplished without the use of the lwp module (virtualave have
not
>> installed that)
>> ?
>>
>> Thanks for any help
>
------------------------------
Date: Thu, 3 Aug 2000 20:28:45 +0100
From: "ken" <kensplace@comport.com>
Subject: Re: Need to read a html page and save it via perl Unable to Use LWP
Message-Id: <8mch4d$g6o$1@news8.svr.pol.co.uk>
Thanks, duly noted for future reference!
I cant install any new stuff, as virtual ave is a free host service, and
i have no control over it , and although a developer (unemployed at mo)
not really into this area.
Actually i found a new host, prohosting.com
(another free one) that works ok with the lwp
so to keep things simple for now im doing it on there,
but its always best to know how to do things the real way!
Ted Marz wrote in message <39886C17.2FAD221C@sei.cmu.edu>...
>I have "installed" perl modules on my local account of a shared
>webserver when that server didn't have the module in their standard
>distribution, and then included them into @INC, and been quite
>successful.
>
>Otherwise, you would have to set up a TCP/IP socket (perhaps using the
>telnet module as a shortcut?) and do all of the protocol handling
>yourself.
>
>Ted
>
>
>ken wrote:
>>
>> any suggestions on how to read a url, and save the page to a file
>> can be accomplished without the use of the lwp module (virtualave have
not
>> installed that)
>> ?
>>
>> Thanks for any help
------------------------------
Date: Thu, 3 Aug 2000 20:32:15 +0100
From: "ken" <kensplace@comport.com>
Subject: Re: Need to read a html page and save it via perl Unable to Use LWP
Message-Id: <8mchav$go$1@news6.svr.pol.co.uk>
Thanks abigail, i cant do anything like that tho, as i need it saved on the
server computer not
locally (lifes never easy, unless your lucky enough)
Joe_Broz@transarc.com wrote in message <39896C33.F3ECABEF@transarc.com>...
>Abigail wrote:
>>
>> ken (kensplace@comport.com) wrote on MMDXXVIII September MCMXCIII in
>> <URL:news:8m9mlh$ga8$1@news8.svr.pol.co.uk>:
>> ## any suggestions on how to read a url, and save the page to a file
>> ## can be accomplished without the use of the lwp module (virtualave have
not
>> ## installed that)
>>
>> Use Netscape, and hit ALT+S.
>>
>
>crtl+s ??
>
>'lynx -dump' should work as well and will save the page as text without all
>the annoying html.
------------------------------
Date: Thu, 3 Aug 2000 20:34:07 +0100
From: "ken" <kensplace@comport.com>
Subject: Re: Need to read a html page and save it via perl Unable to Use LWP
Message-Id: <8mcheg$2qn$1@news7.svr.pol.co.uk>
will look at that, i need the html,. but useful anyway
ta
Joe_Broz@transarc.com wrote in message <39896C33.F3ECABEF@transarc.com>...
>Abigail wrote:
>>
>> ken (kensplace@comport.com) wrote on MMDXXVIII September MCMXCIII in
>> <URL:news:8m9mlh$ga8$1@news8.svr.pol.co.uk>:
>> ## any suggestions on how to read a url, and save the page to a file
>> ## can be accomplished without the use of the lwp module (virtualave have
not
>> ## installed that)
>>
>> Use Netscape, and hit ALT+S.
>>
>
>crtl+s ??
>
>'lynx -dump' should work as well and will save the page as text without all
>the annoying html.
------------------------------
Date: 03 Aug 2000 21:04:19 GMT
From: abigail@foad.org (Abigail)
Subject: Re: Need to read a html page and save it via perl Unable to Use LWP
Message-Id: <slrn8ojni4.ii5.abigail@alexandra.foad.org>
ken (kensplace@comport.com) wrote on MMDXXIX September MCMXCIII in
<URL:news:8mchav$go$1@news6.svr.pol.co.uk>:
:) Thanks abigail, i cant do anything like that tho, as i need it saved on the
:) server computer not
:) locally (lifes never easy, unless your lucky enough)
Well, you're making your life hard yourself by your refusal to use
the LWP module. If you deliberately pick the hard route, don't come
here and whine.
AND DO NOT POST JEOPARDY STYLE!
Abigail
--
srand 123456;$-=rand$_--=>@[[$-,$_]=@[[$_,$-]for(reverse+1..(@[=split
//=>"IGrACVGQ\x02GJCWVhP\x02PL\x02jNMP"));print+(map{$_^q^"^}@[),"\n"
------------------------------
Date: Thu, 03 Aug 2000 21:10:03 GMT
From: Adam Zihla <adam@netsetdesign.com>
Subject: Net::IRC - kicking users
Message-Id: <d5njoskgj8ho66k06hs8rs2h5rdvgjb4g9@4ax.com>
Hello,
Currently I'm using the Net::IRC module for a little perl bot that
I've created for our channel. It's doing its job well and I'm slowly
adding new features. Recently another op requested I add in a
kick user feature, and this has pretty much stumped me. I've read a
few rfcs and searched around, but I can't come up with anything.
Does anyone familiar with Net::IRC have any info to offer on this?
Much thanks,
Adam Zihla
adam@netsetdesign.com
------------------------------
Date: Thu, 03 Aug 2000 11:13:32 -0700
From: Tim Conrow <tim@ipac.caltech.edu>
Subject: Re: Newbie needs memory
Message-Id: <3989B64C.B400E317@ipac.caltech.edu>
>
> while (my $line = <MYFILE>)
> {
> ($first,$second,$third) = ($line=~/(\d+) (\d+) (\d+)/);
> @small_array = ($first,$second,$third);
> push (@main_aray,[@small_array]);
> }
>
> This program takes a lot of memory (about 10 MB for a 10000 lines input
> file) but I only push arrays containing 3 integers... What's going on?
> Does Perl allocate a large amount of memory for any array even if it
> contains few elements?
You're pushing for every line, regardless of whether $line matched the
pattern or not. Try adding a "next if ! defined $first". Here's a
shorter version (untested):
while(<MYFILE>) { push @main_aray,[$1,$2,$3] if /(\d+) (\d+) (\d+)/; }
--
-- Tim Conrow tim@ipac.caltech.edu 626-395-8435
------------------------------
Date: Thu, 03 Aug 2000 12:54:50 -0800
From: "Jeff Yoak" <jeff@yoak.com>
Subject: Re: outputting a CGI script to another frame?
Message-Id: <8mcbnb09ut@news2.newsguy.com>
In article <8mbcr2$jkb$1@vega.worldonline.fr>, "Dominique PLU"
<dominique.plu@ifrance.com> wrote:
> What a strange answer for a newbies. you spend time to prevent that this
> is not the good group, you must spend less time to help and say only
Dominique,
The problem is that this is the incorrect place to look for this answer.
I pointed to the correct place to look which is helpful I would think.
Many, many experts in Perl have left because of the insane volume of
traffic here that mostly consists of FAQs off-topic questions. I don't
want to see that continue. Heck, I've only recently returned after years
of absence and I'm still feeling out whether I'm going to exclusively
follow the moderated group. It is very daunting to face hundreds of new
messages daily even with killfiling and filtering. I feel that answering
questions like this here encourage more of the same behavior and thus
makes the medium less valuable.
But generally, I'm glad that you want to help and that you are
contributing here. This place has a great tradition of helping people.
it is good to see people continuing that tradition.
Cheers,
Jeff
------------------------------
Date: Thu, 03 Aug 2000 19:15:17 GMT
From: Ala Qumsieh <aqumsieh@hyperchip.com>
Subject: Re: pattern matching across two lines
Message-Id: <7a7l9yf96i.fsf@merlin.hyperchip.com>
Larry Rosler <lr@hpl.hp.com> writes:
> In article <7ad7jqfj82.fsf@merlin.hyperchip.com> on Thu, 03 Aug 2000
> 15:38:24 GMT, Ala Qumsieh <aqumsieh@hyperchip.com> says...
> >
> > Rich More <rmore1@my-deja.com> writes:
>
> ...
>
> > > local($/);
> >
> > why do you localize $_ when you don't use it?
>
> That is $/, not $_. The proper localization is in a block, though, so
> it doesn't affect the rest of the program.
Ooops!!! Perhaps I should start wearing glasses!
Thanks for catching that.
--Ala
------------------------------
Date: 03 Aug 2000 22:00:05 GMT
From: abigail@foad.org (Abigail)
Subject: Re: pattern matching across two lines
Message-Id: <slrn8ojqql.io6.abigail@alexandra.foad.org>
Larry Rosler (lr@hpl.hp.com) wrote on MMDXXIX September MCMXCIII in
<URL:news:MPG.13f34fef427028da98ac2e@nntp.hpl.hp.com>:
&& In article <398927E7.664697B2@gredos.cnb.uam.es> on Thu, 03 Aug 2000
&& 10:05:59 +0200, Federico Abascal <fabascal@gredos.cnb.uam.es> says...
&& > Nitin wrote:
&& >
&& > > How can I match patterns across two lines?
&& >
&& > Hello, the simplest way I see is:
&& > while(<>) {
&& > if(/patternA/) {
&& > $_ = <>;
&& > if(/patternB/) {
&& > #You have detected the pattern accross two lines
&& > }
&& > }
&& > }
&& >
&& > I hope this helps,
&&
&& Well, no, because in your code $_ still contains one line -- the second
&& one read. To match /patternB/ across two lines, you must concatenate,
&& not assign, to $_.
&&
&& $_ .= <>;
Of course, that's going to fail if line 1 matches patternA, and lines
2 and 3 combined match patternB.
Abigail
--
$; # A lone dollar?
=$"; # Pod?
$; # The return of the lone dollar?
{Just=>another=>Perl=>Hacker=>} # Bare block?
=$/; # More pod?
print%; # No right operand for %?
------------------------------
Date: Thu, 3 Aug 2000 20:29:32 +0100
From: "Paul Robinson" <robinson_p@btconnect.com>
Subject: Perl CGI Problems
Message-Id: <dGji5.1965$ly4.8474@NewsReader>
I'm attempting to write a perl CGI using templates.
I have an intermittent problem where I call the cgi, it calls a template
which loads into the browser fine (and passes in the correct parameters), If
I then go back a page and attempt to do the same thing it gives me the
following error:
Undefined Subroutine @ Apache:: ROOT::_7eprobin::bmaddusr_2ecgi: handler
called at usr/lib/perl5/site_perl/5.005/i386-Linux/Registry.pm line 135.
It's been driving me insane, any help would be very much appreciated.
Regards
P
------------------------------
Date: Thu, 3 Aug 2000 14:14:14 -0700
From: "David Shtern" <dshtern@pixo.com>
Subject: Problems with installing Win32-api module
Message-Id: <8mcn7g$1kq7$1@nntp1.ba.best.com>
I am new to Perl. Sorry if this is an old, well known problem.
Trying to use functions from Win32::FileOp module. Get error messages (see
below). Attempts to run 'ppm install Win32-api' result in error: "could not
locade ppd file".
Using Win98 with Active Perl build 613.
Any help is appreciated.
David Shtern
====================================
C:\Perl\Projects>perl mapi.pl
Can't locate Win32/AbsPath.pm in @INC (@INC contains: C:/Perl/lib
C:/Perl/site/l
ib .) at C:/Perl/lib/Win32/FileOp.pm line 15.
BEGIN failed--compilation aborted at C:/Perl/lib/Win32/FileOp.pm line 15.
Compilation failed in require at mapi.pl line 3.
BEGIN failed--compilation aborted at mapi.pl line 3.
=====================================
------------------------------
Date: Thu, 03 Aug 2000 14:27:10 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: Queastion about CGI.pm sticky values
Message-Id: <3989B97E.7427C2AA@attglobal.net>
"RS@" wrote:
>
> But why does it happen? I am new to CGI.pm, and Perl, and
> recently encountered the very same problem.
>
> Can anyone recommend a discussion of this kind of relationship
> between methods in CGI? (Perhaps such would be a big 'ol book
> called "Introduction to Objects"...)
There is a book called "The Official Guide to Programming with CGI.pm"
There is also full documentation included with the module. Both of
these sources discuss the sticky nature of several CGI functions.
$ perldoc CGI
------------------------------
Date: Thu, 03 Aug 2000 20:11:12 GMT
From: Ala Qumsieh <aqumsieh@hyperchip.com>
Subject: Re: regex split
Message-Id: <7a4s52f6la.fsf@merlin.hyperchip.com>
"John" <john@nomailplease> writes:
> I have the following bit of code that looks for the word over and splits
> upon finding it. Can I put the regex in the split argument ?
Why don't you try and see?
Hint: If you read the docs on split() (available by typing
'perldoc -f split' on your favourite shell), you will see that the first
argument to split() is indeed a regular expression.
> if ($c =~ s/ over / over /i) {
This is useless. You are changing any occurrence of 'over' (in any case)
to 'over'. I think what you want is simply:
if ($c =~ /over/i) {
> ($a,$b) = split(/over/,$c);
Perhaps you should also add a /i modifier here to ignore case (if you
change the substitution in the if() condition).
> }
--Ala
------------------------------
Date: Thu, 3 Aug 2000 21:21:08 +0100
From: "John" <john@nomailplease>
Subject: Re: regex split
Message-Id: <3989d4af@news.telinco.net>
Ala Qumsieh <aqumsieh@hyperchip.com> wrote in message
news:7a4s52f6la.fsf@merlin.hyperchip.com...
> > if ($c =~ s/ over / over /i) {
>
> This is useless. You are changing any occurrence of 'over' (in any case)
> to 'over'. I think what you want is simply:
>
> if ($c =~ /over/i) {
Yes, no idea what I was thinking about there !
>
> > ($a,$b) = split(/over/,$c);
>
> Perhaps you should also add a /i modifier here to ignore case (if you
> change the substitution in the if() condition).
I thought that split ignored case.
Thanks, John
------------------------------
Date: Thu, 03 Aug 2000 16:20:56 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: regex split
Message-Id: <3989D428.6D67063D@attglobal.net>
John wrote:
>
> I have the following bit of code that looks for the word over and splits
> upon finding it. Can I put the regex in the split argument ?
>
> Thanks John
>
> if ($c =~ s/ over / over /i) {
> ($a,$b) = split(/over/,$c);
> }
Why are you doing it this way? $c =~ s/ over / over /i is a no-op.
Have you read the documentation for split() yet? Please take the
time to do that:
http://www.perl.com/pub/doc/manual/html/pod/perlfunc/split.html
------------------------------
Date: Thu, 03 Aug 2000 21:00:10 GMT
From: Ala Qumsieh <aqumsieh@hyperchip.com>
Subject: Re: regex split
Message-Id: <7aya2edpr8.fsf@merlin.hyperchip.com>
"John" <john@nomailplease> writes:
> Ala Qumsieh <aqumsieh@hyperchip.com> wrote in message
> > Perhaps you should also add a /i modifier here to ignore case (if you
> > change the substitution in the if() condition).
>
> I thought that split ignored case.
Nope. Witness:
% perl -wl
my $str = 'axbxcXdxeXf';
my @let = split /X/, $str;
print join ' and ', @let;
__END__
axbxc and dxe and f
--Ala
------------------------------
Date: Thu, 03 Aug 2000 21:02:28 GMT
From: Ala Qumsieh <aqumsieh@hyperchip.com>
Subject: Re: regex split
Message-Id: <7avgxidpne.fsf@merlin.hyperchip.com>
Drew Simonis <care227@attglobal.net> writes:
> Why are you doing it this way? $c =~ s/ over / over /i is a no-op.
Not really. It will change any occurrence of 'Over', 'oVer', 'OVER', etc
.. to 'over'. But I'm sure you knew that :)
--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 3905
**************************************