[17601] in Perl-Users-Digest
Perl-Users Digest, Issue: 5021 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Dec 3 21:05:33 2000
Date: Sun, 3 Dec 2000 18:05:10 -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: <975895510-v9-i5021@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Sun, 3 Dec 2000 Volume: 9 Number: 5021
Today's topics:
ANNOUNCE: MVS-JESFTP-0.03 <mike.owens@state.nm.us>
apache server ?? newbie ? lightfoote@my-deja.com
changing CHMOD permission with a .cgi script <webmajster@fiver.si>
Re: changing CHMOD permission with a .cgi script <me@privacy.net>
Re: compilation problems (M.J.T. Guy)
file locking on windows- which method is best? <luke@lindsay777.freserve.co.uk>
finding content type <me@privacy.net>
Re: Help with /\d+\s*(S+)/ Please (Tad McClellan)
Re: Help with /\d+\s*(S+)/ Please (Tad McClellan)
Re: Help with /\d+\s*(S+)/ Please <ned911@home.com>
Help with sendmail (Ted Weber)
how to count through 3-dimensional array? <erik.ykema@usa.net>
Re: how to count through 3-dimensional array? (Tad McClellan)
modems and perl sfriend@my-deja.com
Re: need help with warnings <jdhunter@nitace.bsd.uchicago.edu>
Net::SSLeay problems <someone@compugenx.com>
Re: Network "Discovery" (Homer Simpson)
OT: Re: apache server ?? newbie ? (Tim Hammerquist)
PERL thread support building woes <mwoodyard@earthlink.net>
qmail - perl <michael@omon.net.au>
read "." from a file and put it in a hash (Win98) - it <erik.ykema@usa.net>
Re: read "." from a file and put it in a hash (Win98) - <tony_curtis32@yahoo.com>
Regex multiline html (Tony)
Re: rmdir <bowman@montana.com>
Re: rmdir <VincentMurphy@mediaone.net>
search engine problem, need a advice <marco.nl@zonnet.nl>
Re: strings with a minus <johngros@Spam.bigpond.net.au>
term ansi color <dsdf@sdfd.com>
Re: term ansi color <erik.ykema@usa.net>
upload problem <me@privacy.net>
Re: upload problem <me@privacy.net>
User quota check via web (Brcin)
Re: User quota check via web <michael@NOSPAM.vilain.com>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 01 Dec 2000 08:48:26 -0700
From: mikeo <mike.owens@state.nm.us>
Subject: ANNOUNCE: MVS-JESFTP-0.03
Message-Id: <t2ln51ske6n6fc@corp.supernews.com>
I have uploaded to CPAN the following module:
MVS-JESFTP-0.03
>From the README:
NAME
MVS::JESFTP - Perl extension for submitting JCL to MVS systems through
FTP.
DESCRIPTION
IBM mainframe MVS systems accept job input through the Job Entry
Subsystem (JES). This input is in the form of 80-byte *card images* that
correspond to the punch cards of ancient times. The new releases of MVS
can accept this input via FTP to the MVS *internal reader* (equivalent
to the physical card readers of older systems).
This module uses the Net::FTP module under the hood to handle the FTP
chores.
--
Mike Owens
mike.owens@state.nm.us
------------------------------
Date: Sun, 03 Dec 2000 20:08:46 GMT
From: lightfoote@my-deja.com
Subject: apache server ?? newbie ?
Message-Id: <90e98c$fil$1@nnrp1.deja.com>
hi perl family..
i trying to test out my perl and html code with a apache server
on on win 98 ...i installed apache ok but can't seem to get it to
work .... all i get is a blanks screen for about 1 sec...
when starting it up in windows... from the start button...
thanks in advance... foote...
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Mon, 4 Dec 2000 00:19:39 +0100
From: "Bostjan Kocan" <webmajster@fiver.si>
Subject: changing CHMOD permission with a .cgi script
Message-Id: <MyAW5.41607$GU1.5019@news.siol.net>
Hi!
I would like to change a permission of a file from 644 to 777 but with a
.cgi script... I need to automate things and I have like 200 files to change
per day and doing it by hand is not a good solution...
I know it can be done with a simle .cgi command but heaven't had the luck to
spot one in the tutorials...
Does anyone have any idea on how this command would look?
Thanks to anyone that would help me!
------------------------------
Date: Sun, 03 Dec 2000 23:57:29 GMT
From: "EM" <me@privacy.net>
Subject: Re: changing CHMOD permission with a .cgi script
Message-Id: <J5BW5.6869$Nw6.22807@news.iol.ie>
`chmod 777 /path/to/file.ext`;
can be used with directory also
-------
Eric
"Bostjan Kocan" <webmajster@fiver.si> wrote in message
news:MyAW5.41607$GU1.5019@news.siol.net...
> Hi!
>
> I would like to change a permission of a file from 644 to 777 but with a
> .cgi script... I need to automate things and I have like 200 files to
change
> per day and doing it by hand is not a good solution...
>
> I know it can be done with a simle .cgi command but heaven't had the luck
to
> spot one in the tutorials...
>
> Does anyone have any idea on how this command would look?
>
> Thanks to anyone that would help me!
>
>
------------------------------
Date: 3 Dec 2000 21:20:41 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: compilation problems
Message-Id: <90edf9$g4q$1@pegasus.csx.cam.ac.uk>
In article <9035n7$utt$1@nnrp1.deja.com>, <simbean@my-deja.com> wrote:
>
>a few days ago, I re-compiled perl 5.6.0 on a Winnt-pc and everything
>was fine.
>Just until today, when I realized that I forgot to enable threading. So
>I enabled it in the makefile.mk (had to install the compiler and copy
>the source again, because I deleted it after compilation) and compiled
>once more.
>It didn't work.
>So I disabled threading just to see if it compiles without.
>It didn't compile.
>And since then I cannot get perl to compile!
>It always throws some exceptions it (and me) cannot handle.
If you are compiling re-using a source tree with different options,
remember to do
make realclean
before a second try. And also delete config.sh and Policy.sh.
Mike Guy
------------------------------
Date: Mon, 4 Dec 2000 01:31:24 -0000
From: "Luke Lindsay" <luke@lindsay777.freserve.co.uk>
Subject: file locking on windows- which method is best?
Message-Id: <90erub$4vl$1@news.ox.ac.uk>
I am converting some programs which process cgi data and generate html from
Linux to windows.
Under Linux, I use flock for shared and exclusive file locking. However,
flock is, as far as I know, not supported under windows. I have tried using
a simple filelocking mechanism which stores the pid of the process holding
the lock (lockfile::simple written by Raphael Manfredi, downloaded from
cpan). This works for exclusive locks, but the I would also like to be able
to use shared locks. Is there a way to implement shared locks under windows?
If so, which implantation is best?
TIA
Luke
------------------------------
Date: Sun, 03 Dec 2000 23:55:30 GMT
From: "EM" <me@privacy.net>
Subject: finding content type
Message-Id: <S3BW5.6867$Nw6.23040@news.iol.ie>
i have a script to allow people to upload files to a directory where others
can then download
how do i find the content type of the file uploaded?
------
Eric
------------------------------
Date: Sun, 3 Dec 2000 12:04:16 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Help with /\d+\s*(S+)/ Please
Message-Id: <slrn92kv8g.jdl.tadmc@magna.metronet.com>
Ned <ned911@home.com> wrote:
>I have read through the docs and faq but am still having problems.
I actually typed up a response for the first time you asked
this question, then got disgusted because it was so full of
guesses as to be unusable, so I just gave up (and scored
you down).
You have not given enough information to be able to help you.
>I am
>trying to sort a flat file by date which is the second field in the
>file, tab (|) seperated.
Well at least you told us how to identify "fields" this time,
something you left out last time.
>So far I have November and December data (11,
>12)
If you want help sorting data don't you think it would be
a good idea to share what the data looks like?
Got any sample data that you want sorted?
>and the line /\d+\s*(S+)/ is causing the Nov data to be sorted
>correctly (I'm using a descending sort)
Got the code that does the sorting?
It is Really Hard to fix code when you cannot even see the code.
>but the Dec data is being sorted
>last.
And what do you see wrong with that?
December is *supposed* to come after November.
Nothing is wrong.
>The file runs from 11-15 through 12-1 which makes me believe the
>/\d+ line of code is sorting on the day not the whole string.
Post one more time and include all of these:
Input data to be sorted
Short and complete code that is sorting "wrong"
Output data
What output you want instead of what you are getting
--
Tad McClellan SGML consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Sun, 3 Dec 2000 12:07:36 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Help with /\d+\s*(S+)/ Please
Message-Id: <slrn92kveo.jdl.tadmc@magna.metronet.com>
Ned <ned911@home.com> wrote:
> Subject: Help with /\d+\s*(S+)/ Please
\d+ matches one or more digit characters.
\s* matches zero or more whitespace characters.
\S+ matches one or more non-whitespace characters.
The pattern matches a chunk of non-space chars that come
after some digit chars with optional space chars in between.
Please put the subject of your post in the Subject of your post.
Your post was not about the pattern match, it was about sorting.
--
Tad McClellan SGML consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Mon, 04 Dec 2000 00:48:24 GMT
From: Ned <ned911@home.com>
Subject: Re: Help with /\d+\s*(S+)/ Please
Message-Id: <3A2AE9BE.FF4FAB93@home.com>
See below. Appreciate the help.
> Got any sample data that you want sorted?
Data: Name|Date|VacDay|SicDay|Comments
Joe Smith|10-21-2000 09:35|1|0|Vacation
Jane Smith|11-15-2000 10:35|0|1|Dr Appointment
>
>
> >and the line /\d+\s*(S+)/ is causing the Nov data to be sorted
> >correctly (I'm using a descending sort)
>
> Got the code that does the sorting?
@idx = ();
for (@file) {
($item) = /\d+\s*(\S+)/;
push @idx, uc($item);
}
@file = @file [sort{$idx[$b] cmp $idx[$a]}0..$#idx];
>
> December is *supposed* to come after November.
>
> Nothing is wrong.
It is a descending sort - December should come before November.
>
> --
> Tad McClellan SGML consulting
> tadmc@metronet.com Perl programming
> Fort Worth, Texas
------------------------------
Date: Mon, 04 Dec 2000 00:27:42 GMT
From: tweber@abcdefg.com (Ted Weber)
Subject: Help with sendmail
Message-Id: <2yBW5.2179$NN6.11028@newsfeed.slurp.net>
I have some auction and classified scripts I've
been fine tuning for awhile... everything
was working great and I was about to implement it
when our #$#$&#$ ISP decided to move servers around
and also messed around with our mailserver.
Now the scripts crash when they put together an
email to send to the person submitting an auction
or classified and when a new person registers, (to
confirm registration, pass along the initial password, etc.).
I can't get our ISP to put things back the way they were.
My email works OK, but is much slower logging into the
mailserver than it used to be.
Can anyone help me with this? I can email you the
scripts in question, etc. BTW, the datadef.lib is set up
so I can specify sendmail or actual smtp name.
sendmail crashes, smtp name says "bad smtp name".
I tried to telnet in to find out where the sendmail
script is but didn't have any luck. I also tried
using the actual IP number address for the smtp. It
appears to work (no error message or crash), but the
email never shows up at the recipient.
Would really appreciate any help I can get on this.
Thanks very much.
Ted
tweber at webervst dot com.
------------------------------
Date: Sun, 03 Dec 2000 20:36:37 GMT
From: "eriky" <erik.ykema@usa.net>
Subject: how to count through 3-dimensional array?
Message-Id: <p9yW5.32381$lR2.1049260@afrodite.telenet-ops.be>
Perldoc/perldsc gives me for a 2-dim array:
# print the whole thing one at a time
for $i ( 0 .. $#AoA ) {
for $j ( 0 .. $#{ $AoA[$i] } ) {
print "elt $i $j is $AoA[$i][$j]\n";
}
}
That works, but how to count in the same way through all elements of a 3-dim
array $AoA[$i][$j][$k], hence:
for $k ( 0 .. ?????????????)
And how to find out what the number of elements is in any slice, like
$AoA[$i=2][$j=3]
or even $AoA[$i=2][$k=4]?
Thanks, Erik
------------------------------
Date: Sun, 3 Dec 2000 18:05:52 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: how to count through 3-dimensional array?
Message-Id: <slrn92lkeg.jjp.tadmc@magna.metronet.com>
eriky <erik.ykema@usa.net> wrote:
>Perldoc/perldsc gives me for a 2-dim array:
^^^^^^^
You might want to have another look at perlreftut.pod also.
># print the whole thing one at a time
> for $i ( 0 .. $#AoA ) {
> for $j ( 0 .. $#{ $AoA[$i] } ) {
> print "elt $i $j is $AoA[$i][$j]\n";
> }
> }
>
>That works, but how to count in the same way through all elements of a 3-dim
>array $AoA[$i][$j][$k], hence:
> for $k ( 0 .. ?????????????)
for $k ( 0 .. $#{ $AoA[$i][$j] } ) {
>And how to find out what the number of elements is in any slice, like
^^^^^
"slice" already means something in Perl, and it is not what
you mean there. Please don't misuse terms. It leads to
confusion rather than clarification.
To find the number of elements in any array, you use the
"name" of the array in a scalar context.
>$AoA[$i=2][$j=3]
>or even $AoA[$i=2][$k=4]?
$elems_two_three = @{$AoA[2][3]};
--
Tad McClellan SGML consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Sun, 03 Dec 2000 23:21:12 GMT
From: sfriend@my-deja.com
Subject: modems and perl
Message-Id: <90ekh3$o07$1@nnrp1.deja.com>
Hello,
can anyone tell me whether I can use
perl to connect for my unix machine
to a remote NT machine via a modem?
if so how??
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 03 Dec 2000 15:02:48 -0600
From: John Hunter <jdhunter@nitace.bsd.uchicago.edu>
Subject: Re: need help with warnings
Message-Id: <1r66l1nrpj.fsf@video.bsd.uchicago.edu>
>>>>> "Rick" == Rick Delaney <rick.delaney@home.com> writes:
Rick> It could have been defined in this one.
>> use Text::Autoformat;
Rick> Or maybe this one, though I doubt that also. Or maybe in
Rick> some module or library called from any one of these.
Yep, that was it. Text::Autoformat provides 'sub tag(@_)'. Thanks
for the help with this and the pointers to the relevant documentation.
John Hunter
------------------------------
Date: Sun, 3 Dec 2000 14:29:10 -0500
From: "Jimmy" <someone@compugenx.com>
Subject: Net::SSLeay problems
Message-Id: <90e71j$rvs$1@bob.news.rcn.net>
Hello,
I am having a devil of a time keeping Net::SSLeay servers from dying at
the SSL_read function when the client is a simple telnet. I was testing
this to see waht would happen when a unknown protocol was encountered, and I
have tried print_errs() and eval{} as per the documentation, but I cant keep
the program from dying at that point. Does anyone have any experience with
this?
-Jimmy
------------------------------
Date: 4 Dec 2000 00:15:56 GMT
From: homer.simpson@springfield.nul (Homer Simpson)
Subject: Re: Network "Discovery"
Message-Id: <90enns$7s2$0@216.39.130.100>
[replace @S with a meaningful name. @S used here so line doesn't wrap]
@S=`\@echo off && for /f "skip=3 delims=\ " \%a in ('net view') do echo \%a`;
open (FILE,">test.txt");
foreach my $Server(@S){
print FILE $Server;
};
close FILE;
------------------------------
Date: Sun, 03 Dec 2000 21:22:26 GMT
From: tim@degree.ath.cx (Tim Hammerquist)
Subject: OT: Re: apache server ?? newbie ?
Message-Id: <slrn92lff0.c67.tim@degree.ath.cx>
lightfoote@my-deja.com <lightfoote@my-deja.com> wrote:
> i trying to test out my perl and html code with a apache server
> on on win 98 ...i installed apache ok but can't seem to get it to
> work .... all i get is a blanks screen for about 1 sec...
> when starting it up in windows... from the start button...
I assume the "blank screen" is a DOS window? The fact that it
disappears (which I gathered from your description) implies it didn't
start successfully, probably because it's incorrectly set up in the
httpd.conf file. I hate saying this (well, not really), but the greatest
hurdle for Windoze users running Apache is that it's not a GUI
interface. You set it up in the httpd.conf (and possible other files).
Running Apache.exe simply starts the server.
Try running Apache.exe from the command line inside a DOS window and see
what it says. Between the error message returned, and scanning the
error[._]log file, you should be able to figure out what's wrong.
Remember that Apache comes with HTML documentation which you can browse
with a server running.
I apologize if any of my assumptions are incorrect, and if you have any
more questions, well, why don't you try a more appropriate newsgroup?
This is not a Perl Q.
Best of luck.
--
-Tim Hammerquist <timmy@cpan.org>
The world is a tragedy to those who feel,
but a comedy to those who think.
-- Horace Walpole
------------------------------
Date: Sun, 03 Dec 2000 22:22:25 GMT
From: "Matt Woodyard, Genius" <mwoodyard@earthlink.net>
Subject: PERL thread support building woes
Message-Id: <B650319D.C2C%mwoodyard@earthlink.net>
im trying to build thread support into perl 5.6.0 on a redhat 7 box with
EVERYTHING installed.
i have swiped the latest perl 5.6.0 tarball from perl.com
i then configured the thing just like INSTALL.threads (or README.threads )
said
using the ./Configure as well as
./Configure -Dusethreads -Duse5005threads
then i do : make clean
then i do make dep: no problems
then i try a full make and get the following
----
`sh cflags libperl.a perlapi.o` perlapi.c
CCCMD = gcc -DPERL_CORE -c -D_REENTRANT -fno-strict-aliasing
-I/usr/local/include -D_LARGEFILE_SOURCE -D_F
ILE_OFFSET_BITS=64 -O2
In file included from perlapi.c:37:
intrpvar.h: In function `Perl_Iorigargc_ptr':
intrpvar.h:14: structure has no member named `Iorigargc'
intrpvar.h: In function `Perl_Iorigargv_ptr':
intrpvar.h:15: structure has no member named `Iorigargv'
intrpvar.h: In function `Perl_Ienvgv_ptr':
intrpvar.h:16: structure has no member named `Ienvgv'
intrpvar.h: In function `Perl_Iincgv_ptr':
intrpvar.h:17: structure has no member named `Iincgv'
intrpvar.h: In function `Perl_Ihintgv_ptr':
intrpvar.h:18: structure has no member named `Ihintgv'
intrpvar.h: In function `Perl_Iorigfilename_ptr':
intrpvar.h:19: structure has no member named `Iorigfilename'
intrpvar.h: In function `Perl_Idiehook_ptr':
intrpvar.h:20: structure has no member named `Idiehook'
intrpvar.h: In function `Perl_Iwarnhook_ptr':
intrpvar.h:21: structure has no member named `Iwarnhook'
intrpvar.h: In function `Perl_Iminus_c_ptr':
intrpvar.h:24: structure has no member named `Iminus_c'
intrpvar.h: In function `Perl_Ipatchlevel_ptr':
intrpvar.h:25: structure has no member named `Ipatchlevel'
intrpvar.h: In function `Perl_Ilocalpatches_ptr':
intrpvar.h:26: structure has no member named `Ilocalpatches'
intrpvar.h: In function `Perl_Isplitstr_ptr':
intrpvar.h:27: structure has no member named `Isplitstr'
intrpvar.h: In function `Perl_Ipreprocess_ptr':
intrpvar.h:28: structure has no member named `Ipreprocess'
intrpvar.h: In function `Perl_Iminus_n_ptr':
intrpvar.h:29: structure has no member named `Iminus_n'
intrpvar.h: In function `Perl_Iminus_p_ptr':
----and it continues---
and its of course right cause
cat intrpvar.h | grep Perl_Ipatchlevel_ptr
returns no text
so does anyone have any ideas on what the issue is here? i dont really want
to have to move my project from perl (highly text intensive) but if threads
dont work??
------------------------------
Date: Mon, 04 Dec 2000 09:42:19 +0800
From: Michael Salleo <michael@omon.net.au>
Subject: qmail - perl
Message-Id: <3A2AF67B.BC4D15AE@omon.net.au>
Hi,
I'm looking for any tutorials or documentation on anyone who has used
qmail and perl together nicely.
Any help would be appreciated.
Michael
------------------------------
Date: Sun, 03 Dec 2000 22:26:55 GMT
From: "eriky" <erik.ykema@usa.net>
Subject: read "." from a file and put it in a hash (Win98) - it becomes "" ???
Message-Id: <PMzW5.32761$lR2.1083254@afrodite.telenet-ops.be>
L.S.,
Re: problem reading character . (dot) from file
I have a file c:\\perl\\fis2csv.fmt:
RepDec=,
RepMil=.
CSVDec=.
CSVMil=_
I read that line per line and split it into a hash, e.g. $hash{"CSVMil"}="_"
This does work ok for characters like "_", "," but not for ".". I have tried
placing it into " ' \ but that doesn't work.
Any suggestions would be appreciated. Erik.Ykema@usa.net
code:
$Ffmt="c:\\perl\\fis2csv.fmt";
open(FMT, "< $Ffmt") or die "can't open $Ffmt: $!";
#read template
while (<FMT>) {
if (!/^#.*/ && !/^$/) { $fmtI = $fmtI . $_} #discard empty and
commentary else concatenate
}
%fmt = ( H => split /^(\S*?)=\.*/m, $fmtI); # H is one of the keys in the
to-be-read-template
#remove newlines from hash-entries
@keys = keys %fmt;
while (@keys) {
$i=pop(@keys);
$fmt->{$i} = chomp($fmt{$i});
}
#print template
@keys = keys %fmt;
@values = values %fmt;
while (@keys) {
print "Key ", pop(@keys), " equals ", pop(@values), ".\n";
}
output #print template (full stop supplied by print-command)
Key RepDec equals ,.
Key CSVMil equals _ .
Key RepMil equals .
Key CSVDec equals .
------------------------------
Date: 03 Dec 2000 16:37:02 -0600
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: read "." from a file and put it in a hash (Win98) - it becomes "" ???
Message-Id: <878zpxcesx.fsf@limey.hpcc.uh.edu>
>> On Sun, 03 Dec 2000 22:26:55 GMT,
>> "eriky" <erik.ykema@usa.net> said:
> L.S., Re: problem reading character . (dot) from file I
> have a file c:\\perl\\fis2csv.fmt: RepDec=, RepMil=.
> CSVDec=. CSVMil=_
It would be simpler to just use split() on the "=" once
you've found a target line, e.g.
use strict;
my %hash;
while (<DATA>) {
chomp;
my ($key, $val) = split /=/;
$hash{$key} = $val;
}
# simple way to see what's in %hash
use Data::Dumper;
print Dumper(\%hash);
# or if you want to iterate...
while (my($k, $v) = each %hash) {
print "$k => $v\n";
}
__DATA__
RepDec=,
RepMil=.
CSVDec=.
CSVMil=_
You'll want to improve on the choice of variable names,
and you need to strengthen the parsing to catch your
comments or other unwanted lines.
hth
t--
Eih bennek, eih blavek.
------------------------------
Date: Mon, 04 Dec 2000 00:31:23 GMT
From: tony@bigpond.com (Tony)
Subject: Regex multiline html
Message-Id: <slrn92ltus.he.tony@debian.aua1.com>
Hi
Have been trying to remove five lines in one chunk from
html pages. Single lines are no problem but need to
remove their following <BR> tags also. Removing the <BR>
tags seperately does not work because it removes every one
in the page(the way I did it anyway:) Have looked at the
/m, /s, modifiers. Would appreciate if someone might know
where I am going wrong here?
Thanks.
#!/usr/bin/perl -w
use strict;
while(<DATA>) {
#s/^Phone.*//sm; # works for one line
#s/^Phone.*\n.*\n.*\n.*\n.*\n//sm; # these don't work
#s/\APhone.*\n.*\n.*\n.*\n.*\n\Z//sm;
#s/^Phone.*\n.*\n.*\n.*\n.*\n$//sm;
#s/\APhone.*<BR>.*<BR>\Z//sm;
#s/^Phone.*\n<BR>\n.*\n.*\n<BR>\n//sm;
#s/\APhone.*\n<BR>\n.*\n.*\n<BR>\Z\n//sm;
print;
}
__END__
<BR>
more html stuff above here
<BR> # remove from here vvvvvvvvvvvvvvvvvvvvvvvvvv
Phone: Int. 555 5555 5555, Fax: Int. 555 5555 5555
<BR>
<A HREF="mailto:me@myisp.com">E-mail</A>
me@myisp.com
<BR> # to here -----------------------------------
</EM>
</FONT>
------------------------------
Date: Sun, 3 Dec 2000 18:28:19 -0700
From: "bowman" <bowman@montana.com>
Subject: Re: rmdir
Message-Id: <%lCW5.2211$NN6.10667@newsfeed.slurp.net>
Randy Harris <harrisr@bignet.net> wrote
>
> Just a guess based on the Subject, but the OP might be looking for
> something that would work on Windoze.
doesn't rm work? I either have cygwin or mks on all my Windows boxes, and
forget
what naked Windows does or doesn't have.
I guess the next step would be to use File::Path rmtree().
------------------------------
Date: Mon, 04 Dec 2000 01:41:42 GMT
From: Vinny Murphy <VincentMurphy@mediaone.net>
Subject: Re: rmdir
Message-Id: <m3k89ggb7e.fsf@vmurphy-hnt1.athome.net>
>>>>> "Todd" == Todd Anderson <todd@mrnoitall.com> writes:
Todd> Dear Persons, I once saw some code posted in this group that
Todd> would allow you to remove a directory and all of it's contents
Todd> including other directories and as deep as it went. Anybody know
Todd> what it is?
do a perldoc File::Path;
the rmtree subroutine is what you want.
--vjm
------------------------------
Date: Mon, 4 Dec 2000 02:22:00 +0100
From: "marco-nl" <marco.nl@zonnet.nl>
Subject: search engine problem, need a advice
Message-Id: <plCW5.1890$MU5.21734@zonnet-reader-1>
where can i find the best cgi search script with multiple database?
i´m using now a perl script www.perlfect.com
but i always gat a errror message when i add a link,
----------------------------------------------------------------------------
----
In order to avoid domain name overflow on the Newest URLs page,
we ask that you try your submission again later.
End of Results.
i need a search engine that has an option to add url
greetings marco-nl
www.marco-nl.com
------------------------------
Date: Mon, 04 Dec 2000 00:57:46 GMT
From: "John Boy Walton" <johngros@Spam.bigpond.net.au>
Subject: Re: strings with a minus
Message-Id: <e_BW5.3120$xW4.31291@news-server.bigpond.net.au>
Sorry to be so long with this but probs with my ISP had me shutout of news.
When assigning $data[$array][$counter] = $_; There is a warn given when the
line "Home-Ip=144.132.171.190" is come across.
#!e:/millenium programs/perl/bin/perl
$path = "C:/Program Files/G6FTP/";
$file = $path."Users.ini";
open BOGUS,"$file";
$array = 0;
while (<BOGUS>){
if (/\[/){
$flag = 1;
$counter = 0;
print $_;
}elsif (/^\n/){
$flag = 0;
$temp = $data[$array][2];
$temp =~ s/Pass=//;
if ({time-$temp}/86400<31){
$array++;
}
}elsif ($flag){
$data[$array][$counter] = $_;
$counter++;
}
}
"Tad McClellan" <tadmc@metronet.com> wrote in message
news:slrn92ga8i.as9.tadmc@magna.metronet.com...
> John Boy Walton <johngros@Spam.bigpond.net.au> wrote:
>
> >I have a string
>
>
> You think you have a string.
>
> What you think is a string, perl thinks is Perl code.
>
> Where is the code that generates the message?
>
>
> >with a minus sign in it when I copy the scalar into an array
> >element I am getting an 'isn't numeric subtraction error'.
> >How do I escape the minus so the value can be passed?
>
>
> Nobody can know what is wrong with your code because you
> did not show anybody your code.
>
> Show somebody the code.
>
>
> >Or is it just a warning and if run without the -w would go through?
>
>
> It "goes through", whatever that means, regardless of whether
> or not you have warnings turned on.
>
> Warnings do not affect the operation of your program.
>
> If it "works" without warnings enabled, it will "work"
> with warnings enabled and vice versa.
>
> But if it generates warning messages, it is very likely
> to not "work" :-)
>
>
> --
> Tad McClellan SGML consulting
> tadmc@metronet.com Perl programming
> Fort Worth, Texas
------------------------------
Date: Sun, 3 Dec 2000 22:59:55 +0100
From: "matteo" <dsdf@sdfd.com>
Subject: term ansi color
Message-Id: <3a2abc25@post.usenet.com>
**** Post for FREE via your newsreader at post.usenet.com ****
I've tried to usa an example from the perl documentation of
term ansi color
use Term::ANSIColor;
print color 'bold blue';
print "This text is bold blue.\n";
print color 'reset';
print "This text is normal.\n";
print colored ("Yellow on magenta.\n", 'yellow on_magenta');
print "This text is normal.\n";
use Term::ANSIColor qw(:constants);
print BOLD, BLUE, "This text is in bold blue.\n", RESET;
use Term::ANSIColor qw(:constants);
$Term::ANSIColor::AUTORESET = 1;
print BOLD BLUE "This text is in bold blue.\n";
print "This text is normal.\n";
in windows prompt I obtain this (no color, only bw)
?[1;34mThis text is bold blue.
?[0mThis text is normal.
?[33;45mYellow on magenta.
?[0mThis text is normal.
?[1m?[34mThis text is in bold blue.
?[0m?[1m?[34mThis text is in bold blue.
?[0m?[0mThis text is normal.
what to do?
thanks
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
*** Usenet.com - The #1 Usenet Newsgroup Service on The Planet! ***
http://www.usenet.com
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
------------------------------
Date: Sun, 03 Dec 2000 22:28:44 GMT
From: "eriky" <erik.ykema@usa.net>
Subject: Re: term ansi color
Message-Id: <wOzW5.32771$lR2.1083581@afrodite.telenet-ops.be>
should you use
device=c:\windows\command\ansi.sys
in your config.sys?
erik.ykema@usa.net
"matteo" <dsdf@sdfd.com> wrote in message news:3a2abc25@post.usenet.com...
> **** Post for FREE via your newsreader at post.usenet.com ****
>
> I've tried to usa an example from the perl documentation of
>
> term ansi color
>
> use Term::ANSIColor;
> print color 'bold blue';
> print "This text is bold blue.\n";
> print color 'reset';
> print "This text is normal.\n";
> print colored ("Yellow on magenta.\n", 'yellow on_magenta');
> print "This text is normal.\n";
> use Term::ANSIColor qw(:constants);
> print BOLD, BLUE, "This text is in bold blue.\n", RESET;
> use Term::ANSIColor qw(:constants);
> $Term::ANSIColor::AUTORESET = 1;
> print BOLD BLUE "This text is in bold blue.\n";
> print "This text is normal.\n";
>
>
> in windows prompt I obtain this (no color, only bw)
>
> ?[1;34mThis text is bold blue.
> ?[0mThis text is normal.
> ?[33;45mYellow on magenta.
> ?[0mThis text is normal.
> ?[1m?[34mThis text is in bold blue.
> ?[0m?[1m?[34mThis text is in bold blue.
> ?[0m?[0mThis text is normal.
>
> what to do?
> thanks
>
>
>
>
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> *** Usenet.com - The #1 Usenet Newsgroup Service on The Planet! ***
> http://www.usenet.com
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
------------------------------
Date: Sun, 03 Dec 2000 23:52:30 GMT
From: "EM" <me@privacy.net>
Subject: upload problem
Message-Id: <21BW5.6865$Nw6.23100@news.iol.ie>
i am using cgi-lib.pl to accept uploads
the problem is that binary files are corrupt (some additional useless data
is added)
0D0A is replaced with 0D0D0A
how do i fix this bug?
------------
Eric
------------------------------
Date: Mon, 04 Dec 2000 00:14:49 GMT
From: "EM" <me@privacy.net>
Subject: Re: upload problem
Message-Id: <ZlBW5.6872$Nw6.23053@news.iol.ie>
oh i figured it out
i forgot to specify binmode
"EM" <me@privacy.net> wrote in message
news:21BW5.6865$Nw6.23100@news.iol.ie...
> i am using cgi-lib.pl to accept uploads
> the problem is that binary files are corrupt (some additional useless data
> is added)
>
> 0D0A is replaced with 0D0D0A
>
> how do i fix this bug?
>
> ------------
> Eric
>
>
------------------------------
Date: Mon, 04 Dec 2000 00:12:30 GMT
From: info@sz-brkini.si (Brcin)
Subject: User quota check via web
Message-Id: <OjBW5.41610$GU1.5286@news.siol.net>
I'm writing a script for my users to see their disk quota via a web
browser. I use the Quota module for Perl. But when a user tries to see his
quota, he gets "Not privileged".
Any help would be appreciated.
- Brcin
------------------------------
Date: Sun, 03 Dec 2000 17:41:37 -0800
From: "Michael Vilain <michael@NOSPAM.vilain.com>"
Subject: Re: User quota check via web
Message-Id: <michael-64192B.17413703122000@news.nanospace.com>
In article <OjBW5.41610$GU1.5286@news.siol.net>, info@sz-brkini.si
(Brcin) wrote:
> I'm writing a script for my users to see their disk quota via a web
> browser. I use the Quota module for Perl. But when a user tries to see
> his
> quota, he gets "Not privileged".
>
> Any help would be appreciated.
> - Brcin
>
You didn't mention the underlying OS. If it's Solaris, I think the
quota command will show an individual user their quota or root which
will allow displaying all quotas on a drive. You'll have to do the
'display of a listing' thing where the listing is from a hourly cron
or some such thing. Running the perl script as root should not be
an option.
--
Michael Vilain
Certified Advanced Rolfer(r)
rolfer@vilain.com
http://www.vilain.com
------------------------------
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 5021
**************************************