[15623] in Perl-Users-Digest
Perl-Users Digest, Issue: 3036 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat May 13 09:05:36 2000
Date: Sat, 13 May 2000 06:05:13 -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: <958223113-v9-i3036@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Sat, 13 May 2000 Volume: 9 Number: 3036
Today's topics:
Re: 'use integer' causes strange output.. <abe@ztreet.demon.nl>
About MAcPerl Webserver <salvojr@rocketmail.com>
Re: BEGIN and use (Bart Lateur)
Re: Beginner: 8bit-regexp (Bart Lateur)
Re: Best way to connect to MS-SQL Server from Perl? <ella@chello.be>
Re: Calling another executable from within a perl scrip (Steve)
Re: can scalars evaluate as operators? (Bart Lateur)
Re: COBOL subroutines in Perl? (Philip 'Yes, that's my address' Newton)
Complexed perl problem. <webmaster@ostas.lu.se>
concurrent variable names <nospam@devnull.com>
Re: concurrent variable names (Steve)
counter <edbubbleluk@hotmail.com>
Re: Directory Help in perl <Luc-Etienne.Brachotte@wanadoo.fr>
Re: escaping strings <thepoet1@arcormail.de>
extracting mails <jens@irs-net.com>
Re: Formulaire et fichier attache <Luc-Etienne.Brachotte@wanadoo.fr>
Help in Perl <ringo@ringo.net.ru>
Help with dates in Perl <Co_DoGG.NoSPaM@HoMe.CoM>
Re: Help! How to restrict access to images, sounds file (Steve)
Re: Help! How to restrict access to images, sounds file <thepoet1@arcormail.de>
Re: Help! How to restrict access to images, sounds file <flavell@mail.cern.ch>
How to replace "\" , HELP! <mmlai@sfu.ca>
Re: Job (Steve)
Re: linked list in perl (Bart Lateur)
Re: Regex Question (hopefully, an educated guess) <m.lahr@cronia.org>
Re: regx question (Bart Lateur)
Re: regx question (dc)
Re: Silencing module warnings. (Steve)
Re: The way to load a script on certain time by itself (Bart Lateur)
Using Net::FTP in a subroutine juump@my-deja.com
Re: Using Net::FTP in a subroutine <bwalton@rochester.rr.com>
where can i find perl? cdgdgjgjd@dydydhy.com
Re: where can i find perl? <Luc-Etienne.Brachotte@wanadoo.fr>
Re: where can i find perl? <Luc-Etienne.Brachotte@wanadoo.fr>
Re: zen and the art of trolling [OT] (Clinton A. Pierce)
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sat, 13 May 2000 13:08:29 +0200
From: Abe Timmerman <abe@ztreet.demon.nl>
Subject: Re: 'use integer' causes strange output..
Message-Id: <andqhsgp6t26jcn3odf7vtlg8ral0hmgif@4ax.com>
On Thu, 11 May 2000 22:57:25 -0700, Larry Rosler <lr@hpl.hp.com> wrote:
> In article <8fg00j$ct9$0@216.155.33.118> on 12 May 2000 04:06:43 GMT,
> The WebDragon <nospam@devnull.com> says...
> > In article <slrn8hleg9.k1b.tadmc@magna.metronet.com>, tadmc@metronet.com (Tad McClellan)
> > wrote:
...
> > print hidden({-name=>'hol', -default=>'', -override=>1});
>
> That's not what the documentation says.
>
> print $query->hidden(-name=>'hidden_name',
> -default=>['value1','value2'...]);
> -or-
> print $query->hidden('hidden_name','value1','value2'...);
>
Eurm...: (from perldoc CGI)
-----
Many newcomers to CGI.pm are puzzled by the difference between the
calling conventions for the HTML shortcuts, which require curly braces
around the HTML tag attributes, and the calling conventions for other
routines, which manage to generate attributes without the curly
brackets. Don't be confused. As a convenience the curly braces are
optional in all but the HTML shortcuts. If you like, you can use curly
braces when calling any routine that takes named arguments. For example:
print $q->header( {-type=>'image/gif',-expires=>'+3d'} );
-----
--
Good luck,
Abe
------------------------------
Date: Sat, 13 May 2000 13:04:44 +0200
From: "Salvo Jr" <salvojr@rocketmail.com>
Subject: About MAcPerl Webserver
Message-Id: <8fjcij$ai0$1@nmaster.tin.it>
to all: I just need a little help:
I use the webserver MacPerl 1.0b3.5
All work fine!
I just need a little help:
I have a file .pl that work with Win32::ODBC
How can I setup it to work under MacPerl webserver?
There is a newest version of MacPerl Webserver or another that you can
suggest to me?
Thank You much
Salvo Jr
salvojr@rocketmail.com
#---------file ODBC.pl
use Win32::ODBC;
sub takfield
{
my ($ct, $cl, $qs, @qs, %qs, $name, $value, );
print "Content-type: text/HTML$crlf$crlf";
$ct = $ENV{"CONTENT_TYPE"};
$cl = $ENV{"CONTENT_LENGTH"};
$qs = $ENV{"QUERY_STRING"}; # Put the URL-encoded data into a variable.
print "<html><body>";
$sql = "SELECT * FROM table";
$dsn = "ODBCname";
$db = new Win32::ODBC($dsn);
$db->Sql($sql);
while ($db->FetchRow())
{
($rec1) = $db->Data("field1");
print "$rec1$crlf";
print "<br>";
}
$db->Close();
print "</body></html>";
}
1;
#-------- end
------------------------------
Date: Sat, 13 May 2000 11:35:59 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: BEGIN and use
Message-Id: <391e3984.1431345@news.skynet.be>
Larry Rosler wrote:
>Well, if you generalize this to:
>
> perl -wle 'sub a { 23 ; ; ; ; ; } print a'
> 23
>
>In perlsub, we find "The return value of a subroutine is the value of
>the last expression evaluated." A null statement seems to have *no*
>expression to evaluate, not a *null* expression, which would evaluate to
>"" or () depending on context.
Even that POV doesn't fully apply.
sub test {
42;
if(shift) {
} else {
}
}
print test(0), test(1);
This prints nothing, altough it produces a warning:
Useless use of a constant in void context
The last statement that actually produces some thing, is '42', except
that it is ignored. The if statement, or the else, produce nothing, i.e.
the same as a bare "return".
--
Bart.
------------------------------
Date: Sat, 13 May 2000 11:35:30 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Beginner: 8bit-regexp
Message-Id: <391f3b5f.1906611@news.skynet.be>
ocromm@my-deja.com wrote:
>You can't imagine how many time I spend with errors stemming from that
>kind of code-problems. Try using sources from Japanese Windows (SJIS)
>and Mac-coded German, incompletely exported into Windows format, and
>then use these under UNIX...
The ultimate answer may be in Unicode, or rather, UTF-8.
Perl 5.6.0 is alleged to have UTF-8 support built-in, but I haven't seen
an example of it actually doing anything, yet.
XML::Parser's text output is in UTF-8, although it can be convinced in
accepting any character encoding in the XML files.
You can basically, create conversion from any encoding into/from UTF-8,
based on the data files to be found at
<ftp://ftp.unicode.org/Public/MAPPINGS/>. The algorithm to convert from
plain Unicode to UTF-8, or vice versa, can be found at
<http://czyborra.com/utf/#UTF-8>; simple conversion scripts in plain
Perl can be found at <http://czyborra.com/unicode/utf8> and
<http://czyborra.com/unicode/vtf8>. The module Unicode::String (see
CPAN) ought to be able to do the conversion for you.
--
Bart.
------------------------------
Date: Sat, 13 May 2000 11:52:53 GMT
From: Mike Reys <ella@chello.be>
Subject: Re: Best way to connect to MS-SQL Server from Perl?
Message-Id: <Pine.LNX.4.20.0005131353110.9092-100000@proxy.ella.org>
With the 6.5, you could connect as if it was a Sybase... this worked
almost always. The main problem is that SQL-server is "totally" rewritten
(says Microsoft). And as you know that most M$-stuff is proprietary
software, with proprietary methods...
Therefore it will be difficult for module-writers to make a decent
DBD::SQLServer
Mike Reys
mike.reys@chello.be
On Sat, 6 May 2000, Tom Williamson wrote:
> Hello -
>
> I'm looking for some information - facts and/or advice - on the best way to
> connect to a SQL Server 7 database running on NT, from a Linux box using
> Perl. So far I have checked www.perl.org, www.perl.com and the CPAN archive
> including the FAQs and the DBI/DBD readme files (those I have been able to
> locate). I have discovered the following:
>
> 1) There is not, so far as I can tell, a DBD::SQLServer module or anything
> like it (why?);
> 2) The DBD::ODBC module (my second choice) cheerfully announces itself as
> "ALPHA SOFTWARE - YOUR MILEAGE MAY VARY". Is there another (non-alpha)
> module that people can use for ODBC?
>
> Is anyone out there actually interfacing Perl to SQL Server? And please -
> how are you doing it? If you are using ODBC, how are you creating your DSN
> on the Unix client box?
>
> Thanks....
>
>
>
------------------------------
Date: 13 May 2000 11:45:48 GMT
From: sjlen@ndirect.co.uk (Steve)
Subject: Re: Calling another executable from within a perl script
Message-Id: <slrn8hqbki.rmg.sjlen@zero-pps.localdomain>
see perldoc -f exec and perldoc -f system
--
Cheers
Steve email mailto:sjlen@ndirect.co.uk
%HAV-A-NICEDAY Error not enough coffee 0 pps.
web http://www.ndirect.co.uk/~sjlen/
or http://start.at/zero-pps
10:08am up 16 days, 12:09, 4 users, load average: 1.36, 1.13, 1.03
------------------------------
Date: Sat, 13 May 2000 11:38:48 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: can scalars evaluate as operators?
Message-Id: <39203e71.2692258@news.skynet.be>
eedlin@my-deja.com wrote:
>I must be missing something here, because this makes no sense to me
>mathematically any how.
Well I interpret the question as that the user must be able to specify
what kind of results he wants, for example in a search engine.
--
Bart.
------------------------------
Date: Sat, 13 May 2000 08:46:03 GMT
From: nospam.newton@gmx.li (Philip 'Yes, that's my address' Newton)
Subject: Re: COBOL subroutines in Perl?
Message-Id: <391cf063.439996182@news.nikoma.de>
[newsgroups trimmed]
On Thu, 11 May 2000 04:07:44 GMT, Dan Sugalski <dan@tuatha.sidhe.org>
wrote:
>On the other hand, some platforms are heavily biased towards one language
>(such as C on Unix) or all the compilers play insular little "The world is
>all in my language spat out by my compiler" games, in which case things
>are usually a lot trickier.
This can also lead to situations such as "yes, you can have a program
written in language A and language B, but the main routing must be in
language B because language B can link in language A's object files but
can't produce any standard object files itself". For values of A and B
including C and Turbo Pascal.
Cheers,
Philip
--
Philip Newton <nospam.newton@gmx.li>
If you're not part of the solution, you're part of the precipitate.
------------------------------
Date: Sat, 13 May 2000 11:25:50 +0200
From: Jimmy Lantz <webmaster@ostas.lu.se>
Subject: Complexed perl problem.
Message-Id: <391D1F9E.4319A6E5@ostas.lu.se>
Complexed perl problem.
Hi, I have the following problem:
I need to do the following operation on a (huge) data file see sample
below :
Strip the first row of the < & > and print it into a output file
then I have to read the the rest of the data and to be able to
and put it into a hash ??(if that’s the best way to go) and associate
the <PRON(pers,sing)> with the value I and <V(montr,pres)> with think
and so forth so that I can analyse the values depending on if it’s PRON
or V or something else.
The following:
**[main <ADJ(ge)>]**
is a match and need’s to be stripped of the
**[ & ]** and printed to the output file.
Everything printed (I need to print more on each row but that I can
handle myself) has to be delimited by
|| (double pipe)
Further below is a perlprog that I started to make until I realized that
I needed some help.
<ICE-GB:S2A-016 #2:1:B>
I <PRON(pers,sing)> think <V(montr,pres)> the <ART(def)> **[main
<ADJ(ge)>]** things <N(com,plu)> that <PRON(rel)> I <PRON(pers,sing)>
saw <V(cxtr,past)> as <PREP(ge)> <,> <PAUSE(short)> as <PREP(ge)>
**[absent <ADJ(ge)>]** from <PREP(ge)> disa <UNTAG> from <PREP(ge)> work
<N(com,sing)> with <PREP(ge)> with <PREP(ge)> disabled <ADJ(edp)> people
<N(com,plu)> was <V(cop,past)>
<ICE-GB:S3A-051 #8:1:A>
**[medium <ADJ(ge)>]** speed <N(com,sing)>
NB! Data filerows above can vary in length (see row 2 & 4)
#!/usr/bin/perl
$faktor1 = "<ICE-GB:";
$icedata = "icedata.data";
open(FILE, "$icedata");
while(<FILE>) {
$file = $_;
chomp $file;
if ($file =~ /$faktor1/) {
$file =~ s/$faktor1/ /;
$file =~ s/>/ /;
print "$file\n";
}
elsif ($file !~ /$faktor1/ ){
@db_fields = split (/>/, $file);
foreach $field (@db_fields) { print "$field\n"; }
}
else{
print "No match\n";
}
}
close(FILE);
Pls. also send an reply to my Email webmaster@
ostas.lu.se
Yrs sincerely
Jimmy Lantz
------------------------------
Date: 13 May 2000 07:44:50 GMT
From: The WebDragon <nospam@devnull.com>
Subject: concurrent variable names
Message-Id: <8fj15i$5s6$0@216.155.33.19>
Is there a module or a script I can run that will examine other scripts and tell
me which variables they have in common?
I have two scripts, which when run concurrently via an index.htm frameset, crash
macsbug rather horribly.
use strict IS in force in BOTH scripts, so I don't think it's namespace
pollution. hard to tell .. gonna play with it some more.. not exactly sure
what's going on here.
--
send mail to mactech (at) webdragon (dot) net instead of the above address.
this is to prevent spamming. e-mail reply-to's have been altered
to prevent scan software from extracting my address for the purpose
of spamming me, which I hate with a passion bordering on obsession.
------------------------------
Date: 13 May 2000 11:45:47 GMT
From: sjlen@ndirect.co.uk (Steve)
Subject: Re: concurrent variable names
Message-Id: <slrn8hqb24.rmg.sjlen@zero-pps.localdomain>
On 13 May 2000 07:44:50 GMT, The WebDragon wrote:
>Is there a module or a script I can run that will examine other scripts and tell
>me which variables they have in common?
>
>I have two scripts, which when run concurrently via an index.htm frameset, crash
>macsbug rather horribly.
>
>use strict IS in force in BOTH scripts, so I don't think it's namespace
>pollution. hard to tell .. gonna play with it some more.. not exactly sure
>what's going on here.
>
I'd say check what modules they're using, make sure you've got the most recent
versions of those modules (if it's in your power). Check the server error
logs, from my limited experience they give much better explanations of the
problem than what the browser tells you. If you run both scripts from the
comand line at the same time do you still get error messages.
--
Cheers
Steve email mailto:sjlen@ndirect.co.uk
%HAV-A-NICEDAY Error not enough coffee 0 pps.
web http://www.ndirect.co.uk/~sjlen/
or http://start.at/zero-pps
10:08am up 16 days, 12:09, 4 users, load average: 1.36, 1.13, 1.03
------------------------------
Date: Sat, 13 May 2000 07:20:18 -0400
From: "Ed" <edbubbleluk@hotmail.com>
Subject: counter
Message-Id: <8fjdjm$r5j$1@slb7.atl.mindspring.net>
Where can I get a nice counter that does not increment on each page
refresh.. One that will remember ip or visitor for a period of time.
Thanks
Ed
------------------------------
Date: Sat, 13 May 2000 11:23:41 +0200
From: "Luc-Etienne.Brachotte" <Luc-Etienne.Brachotte@wanadoo.fr>
Subject: Re: Directory Help in perl
Message-Id: <391D1F1D.32D4BBCE@wanadoo.fr>
CoDoGG a écrit :
> Could some please help me..
> I am writing a perl CGI program, and I want to find a file in the
> directory.
>
> Is there a easy way that I could generate a list or a array of filenames
> of a certain directory to easily loop through and compare.
>
> Thanks alot,
> Co-DoGG
This loops on all files in the current directory:
while (<>)
{
#file name in $_
}
------------------------------
Date: Sat, 13 May 2000 14:03:26 +0200
From: Christian Winter <thepoet1@arcormail.de>
Subject: Re: escaping strings
Message-Id: <eagjf8.nj8.ln@usenet-autoren.de>
Jeff Zucker <jeff@vpservices.com> schrob:
> PSI::ESP tells me you are asking either about
> URL escaping, e.g. to create a query string where a space becomes %20,
> in which case you can use CGI::escape() or HTML escaping
Hm, you are quite fast. Did you use Time::Machine to get
PSI::ESP? As I just now uploaded it to
http://www.linux-config.de/software/PSI-ESP-0.01.tar.gz
Yours
Christian
------------------------------
Date: Sat, 13 May 2000 13:40:21 +0200
From: Jens Luedicke <jens@irs-net.com>
Subject: extracting mails
Message-Id: <391D3F25.39035069@irs-net.com>
hi there ...
How can I extract all mails
from an mbox mail-folder into
single files ?
Let's say that I have ten mails
in my folder at /var/spool/mail/me
and I want to dump each mail into
an own file somewhere in my homedir.
How can I do that?
--
with friendly regards...
Jens Luedicke <jens@irs-net.com>
http://www.irs-net.com/
$a="34t3354s3434u553453J";$b="r324eht37282o34534na";
$c="3345l534r523e55P234234";$d="345r342e345k2314c56a34h";
@beg = ("$a","$b","$c","$d");foreach $p (@beg){ $p =~
s/[0-9]//g;$sl=reverse("$p");print"$sl ";}print"\n";
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GIT/H/P/L d- s: a-- C+++ UL P++ L+++ E---- W++ N+ o? K? w-- O? M(-) V?
PS++ PE Y+ PGP++ t+ 5-- X- R- tv+ b++ DI++++ D- G e h! r-- z?
------END GEEK CODE BLOCK------
------------------------------
Date: Sat, 13 May 2000 09:14:04 +0200
From: "Luc-Etienne.Brachotte" <Luc-Etienne.Brachotte@wanadoo.fr>
Subject: Re: Formulaire et fichier attache
Message-Id: <391D00BC.392FF3A8@wanadoo.fr>
Fabien Quesnel a écrit :
> Voila mon problème :
> J'ai besoin d'offrir à mes visiteurs la possibilité d'envoyer par mail leur
> CV en .doc.
>
> J'ai un champ Input="FILE" dans mon formulaire. Je fait "parcourir," je
> choisi mon fichier, j'obtient donc (par ex) :
> c:\mesdocs\toto.doc dans le champ du formulaire.
>
> Or, à la réception de mon mail, j'obtient cette ligne, mais pas le fichier
> attaché !
>
> J'ai essayé des tas de scripts PERL, mais aucun ne prend en compte ce type
> de champ si particulier !! Pourtant, les formulaires des services Yahoo ou
> Hotmail par ex, permettent d'envoyer des fichiers attachés par mail !! Alors
> ?
>
> Cela fait 2 jours que je cherche, PLEAAAASSSEEE !!!!
Le transferts des données de la page au script se fait
-- soit par "GET"
$buffer = $ENV{QUERY_STRING};
-- soit par "POST"
Le script obtiendra les données par
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
Et pour tester:
if ($ENV{'REQUEST_METHOD'} eq 'GET')
{
$buffer = $ENV{QUERY_STRING};
}
else
{
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
}
Avec le GET est que les données sont transmises accolées au nom de la page.
C'est intéressant.
Avec le POST, elles sont transmises dans un buffer à part.
------------------------------
Date: Sat, 13 May 2000 13:32:12 +0400
From: "ringo" <ringo@ringo.net.ru>
Subject: Help in Perl
Message-Id: <391d21f5@news.ptt.ru>
Hello,
Have anybody script to daily rotate of some .html pages.
Please help!!!
answer on my email, pls
ringo@ringo.net.ru
--
¿ Ringo Design. All Rights Reserved. No part of this email shall be
reproduced,
stored in a retrieval system, or transmitted by any means, electronic,
mechanical, photocopying, recording, or otherwise, without the prior
written consent from the author. No patent liability is assumed with
respect to the use of the information contained herein.
------------------------------
Date: Sat, 13 May 2000 10:21:23 GMT
From: CoDoGG <Co_DoGG.NoSPaM@HoMe.CoM>
Subject: Help with dates in Perl
Message-Id: <391D2CF0.F521D928@HoMe.CoM>
Can someone help me.
I need to find the current date in perl in the format YYYY-MM-DD in
order to compare it to another date located in a file!!
Does anyone have any suggestions
Thanks
Co-DoGG
------------------------------
Date: 13 May 2000 11:45:49 GMT
From: sjlen@ndirect.co.uk (Steve)
Subject: Re: Help! How to restrict access to images, sounds files, htmls from foreign website
Message-Id: <slrn8hqc7r.rmg.sjlen@zero-pps.localdomain>
The foreign web will only be loading your images won't it, not the cgo or html.
just find out who it is (by checking the log files), and deny that IP address
on the server (that should give them a suitable headache).
You don't say what your url is so we can only presume that they are dirty
pictures.
--
Cheers
Steve email mailto:sjlen@ndirect.co.uk
%HAV-A-NICEDAY Error not enough coffee 0 pps.
web http://www.ndirect.co.uk/~sjlen/
or http://start.at/zero-pps
10:08am up 16 days, 12:09, 4 users, load average: 1.36, 1.13, 1.03
------------------------------
Date: Sat, 13 May 2000 12:42:52 +0200
From: Christian Winter <thepoet1@arcormail.de>
Subject: Re: Help! How to restrict access to images, sounds files, htmls from foreign website
Message-Id: <cjbjf8.r54.ln@usenet-autoren.de>
Dave Winfred <nospam@nospam.com> schrob:
> I attempted to restrict this by using a server-side Perl script to load
> images, but this hasn't helped. It would seem that I need some way of
> determining if the Perl script was invoked by my web pages or from
> foreign web pages.
Check the environment variable $HTTP_REFERRER for the domainpart, e.g.
unless ( $ENV{"HTTP_REFERRER"} =~ qr"^http://your.domain.somewhere" )
{
# print dummy picture / copy warning and exit
}
HTH
Christian
------------------------------
Date: Sat, 13 May 2000 14:24:30 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Help! How to restrict access to images, sounds files, htmls from foreign website
Message-Id: <Pine.GHP.4.21.0005131410590.16890-100000@hpplus01.cern.ch>
[comp.lang.perl is obsolete - f'ups narrowed]
On 13 May 2000, Steve wrote over-long lines that when reflowed to
usenet customs said:
> The foreign web will only be loading your images won't it, not the
> cgo or html.
>
> just find out who it is (by checking the log files), and deny that
> IP address on the server (that should give them a suitable
> headache).
Do you actually have the first idea what you're talking about?
To the O.P: there's a half-hearted solution based on the HTTP Referer:
header - most economically implemented by mod_rewrite in the Apache
server. It's easily circumvented by anyone who launders their HTTP
headers, but it's the best that you can do in a WWW context. I'd
recommend pursuing your problem on the relevant web servers or CGI
authoring group - after checking their FAQs - it's well out of place
here. Here's a fish, but you'd do better to learn fishing for
yourself: http://www.engelschall.com/pw/apache/rewriteguide/#ToC38
have fun
------------------------------
Date: 13 May 2000 10:10:04 GMT
From: Murvin Ming-Wai Lai <mmlai@sfu.ca>
Subject: How to replace "\" , HELP!
Message-Id: <8fj9ls$a19$1@morgoth.sfu.ca>
Hi all,
Thanks for your help.
The reason I ask the back slash problem is that I have a html page which
will upload the file & run the perl script. Since, in Windows, the input
file name from the page always looks like this: "C:\Directory\File", and I
have no control on the \ , I face some difficulties to extract the file
name from this input string.
Well, actually, after I read all the response, I come up an idea. That
is I write a javascript (for the html page) that will change all the \ to
/ when submit. I don't know whether it is possible or not. I will try
this. Of course, I'm also looking for other alternatives too. ( This is a
way to learn =) ).
Thank you for all the helps.
--
.........................................................................
*>>>>Murvin Lai<<<< >>>>--Muffin--<<<< email: murvin_lai@sfu.ca *
*homepage: http://www.sfu.ca/~mmlai mmlai@sfu.ca *
`````````````````````````````````````````````````````````````````````````
------------------------------
Date: 13 May 2000 11:45:49 GMT
From: sjlen@ndirect.co.uk (Steve)
Subject: Re: Job
Message-Id: <slrn8hqbrl.rmg.sjlen@zero-pps.localdomain>
On Fri, 12 May 2000 20:34:21 GMT, patric-REMOVE-@kajen.com wrote:
>Hi!
>
>I wonder if there is anyone who knows any good sites where you can find
>temporary Perl jobs or knows anyone who is looking for a temporary
>programmer? Or any companys that hire overseas Perl programmers?
try http://www.jobserve.co.uk if you d/l their database (over 5000 jobs),
I've written a script that butchers it into a human readable format and
allows you to weed out the ones you're not interested in based on key
words that you supply in a text file.
--
Cheers
Steve email mailto:sjlen@ndirect.co.uk
%HAV-A-NICEDAY Error not enough coffee 0 pps.
web http://www.ndirect.co.uk/~sjlen/
or http://start.at/zero-pps
10:08am up 16 days, 12:09, 4 users, load average: 1.36, 1.13, 1.03
------------------------------
Date: Sat, 13 May 2000 11:39:59 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: linked list in perl
Message-Id: <39213ef1.2820673@news.skynet.be>
Samay wrote:
>sample code here:
>
>$list = undef;
>foreach (reverse 1..5){
> $list = [$_ * $_, $list];
>}
Heh, that looks pretty much like the code I gave, from the top of me
head.
--
Bart.
------------------------------
Date: Sat, 13 May 2000 08:54:20 GMT
From: Michael Lahr <m.lahr@cronia.org>
Subject: Re: Regex Question (hopefully, an educated guess)
Message-Id: <8fj57p$6ft$1@nnrp1.deja.com>
hi,
this will probably make the regex faster:
($a,$b,$c)=snmpwalk($community,$ip,$mib);
if($a=~m/^sysDescrib.+ : (.*)$/o) {
}
and so on for the 3 vars
with the o-option perl will compile the pattern only once, of course
perl will compile 3 patterns but it seems to be much faster.
at least on my machine
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Sat, 13 May 2000 11:42:42 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: regx question
Message-Id: <39223f44.2903445@news.skynet.be>
dc wrote:
>Anchoring made a pretty big difference.
>Surprisingly, at least to me, using the mini-matches was actually
>slower by a very small degree. I'm pretty sure this has to do with
>the test data I ran it on
You mean the /a/ && /e/ && ... thing? No, it's not your data. It is the
overhead of entering and exiting the regex engine. In one regex, you
have that overhead once; in the combination of minimatches, you have it
5 times.
--
Bart.
------------------------------
Date: Sat, 13 May 2000 12:13:33 GMT
From: ANTISPAMfartknocker@cyberdude.com (dc)
Subject: Re: regx question
Message-Id: <391d4516.491790339@24.2.2.74>
On Sat, 13 May 2000 11:42:42 GMT, bart.lateur@skynet.be (Bart Lateur)
wrote:
>dc wrote:
>
>>Anchoring made a pretty big difference.
>>Surprisingly, at least to me, using the mini-matches was actually
>>slower by a very small degree. I'm pretty sure this has to do with
>>the test data I ran it on
>
>You mean the /a/ && /e/ && ... thing? No, it's not your data. It is the
>overhead of entering and exiting the regex engine. In one regex, you
>have that overhead once; in the combination of minimatches, you have it
>5 times.
>
No, I was comparing
/^(?=.*a)(?=.*e)(?=.*i)(?=.*o).*u/
and this
/^(?=.*?a)(?=.*?e)(?=.*?i)(?=.*?o).*?u/
On a PC running redhat with perl 5/5/3, the perl Benchmark utility
(not sure if that's the correct word) ran a file with 45K words in it
(one word per line) past the above regx's 100 times. The first one
above consistently came out about 1 to .5 seconds of *CPU* time
faster.
david
Anti-Spam Address in Use. Remove the AntiSpam
in above address before replying to this
message.
------------------------------
Date: 13 May 2000 11:45:48 GMT
From: sjlen@ndirect.co.uk (Steve)
Subject: Re: Silencing module warnings.
Message-Id: <slrn8hqber.rmg.sjlen@zero-pps.localdomain>
What you're talkin about isn't a warning it's the standard
output from that process. You can probably change this
behaviour, but you'll have to read the docs first.
--
Cheers
Steve email mailto:sjlen@ndirect.co.uk
%HAV-A-NICEDAY Error not enough coffee 0 pps.
web http://www.ndirect.co.uk/~sjlen/
or http://start.at/zero-pps
10:08am up 16 days, 12:09, 4 users, load average: 1.36, 1.13, 1.03
------------------------------
Date: Sat, 13 May 2000 11:44:39 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: The way to load a script on certain time by itself ?
Message-Id: <3923400a.3101944@news.skynet.be>
Abigail wrote:
>++ How to make to load a script on certain time by itself ?
>
>How could it "load" (compiled? run?) itself while it's not "loaded" yet?
That must be the black art of bootstrapping.
--
Bart.
------------------------------
Date: Sat, 13 May 2000 07:16:46 GMT
From: juump@my-deja.com
Subject: Using Net::FTP in a subroutine
Message-Id: <8fivgn$vp0$1@nnrp1.deja.com>
Using Net::FTP, I've written a simple script to crawl an FTP server
looking for certain files. I think this should be doable with a single
FTP connection, since the subroutine that checks the files in each
directory only needs to look at the directory one time.
What I thought I could do was open the connection in the main part of
the script, and then refer to $ftp (my FTP socket) in the subroutine.
However, the subroutine does not recognize $ftp as anything at all. (The
command $ftp->cwd(...) fails in the subroutine.)
I'm pretty new to Perl, but I thought variables and objects were global
unless declared otherwise.
So what I've had to do is create a new Net::FTP socket each pass through
the subroutine, which through recursion really bogs down the server
until it no longer accepts new connections. (Although I close/quit the
socket before I start the recursion.)
How do I get the subroutine to recognize an FTP socket created in the
main part of the script? Do I need to pass $ftp as a parameter to the
subroutine? And is there some lag between the time I call "$ftp->close;
$ftp->quit;" and the time the server actually closes the connection?
Thanks for any help.
Steve
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Sat, 13 May 2000 11:44:58 GMT
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: Using Net::FTP in a subroutine
Message-Id: <391D3F45.65049C52@rochester.rr.com>
juump@my-deja.com wrote:
...
> However, the subroutine does not recognize $ftp as anything at all. (The
> command $ftp->cwd(...) fails in the subroutine.)
...
> How do I get the subroutine to recognize an FTP socket created in the
> main part of the script? Do I need to pass $ftp as a parameter to the
> subroutine? And is there some lag between the time I call "$ftp->close;
> $ftp->quit;" and the time the server actually closes the connection?
...
> Steve
...
You need to pass a reference to $ftp, and dereference it in your sub.
Something like [untested]:
&subname(\$ftp);
...
sub subname{
my $ftpr=shift;
my $ftp=$$ftpr;
#rest of sub as is
...
}
--
Bob Walton
------------------------------
Date: Sat, 13 May 2000 12:02:51 GMT
From: cdgdgjgjd@dydydhy.com
Subject: where can i find perl?
Message-Id: <391d4415.14505770@news.surfree.net.il>
where can i find perl?
------------------------------
Date: Sat, 13 May 2000 14:29:10 +0200
From: "Luc-Etienne.Brachotte" <Luc-Etienne.Brachotte@wanadoo.fr>
Subject: Re: where can i find perl?
Message-Id: <391D4A96.3D6BA137@wanadoo.fr>
cdgdgjgjd@dydydhy.com a écrit :
> where can i find perl?
in a shell
------------------------------
Date: Sat, 13 May 2000 14:32:54 +0200
From: "Luc-Etienne.Brachotte" <Luc-Etienne.Brachotte@wanadoo.fr>
Subject: Re: where can i find perl?
Message-Id: <391D4B76.7499F8E6@wanadoo.fr>
cdgdgjgjd@dydydhy.com a écrit :
> where can i find perl?
http://www.perl.com
------------------------------
Date: Sat, 13 May 2000 11:22:18 GMT
From: clintp@geeksalad.org (Clinton A. Pierce)
Subject: Re: zen and the art of trolling [OT]
Message-Id: <KVaT4.71456$h01.513599@news1.rdc1.mi.home.com>
In article <391D0DCF.FA1529F2@west.net>,
John Callender <jbc@west.net> writes:
> Some of you, I know, will say I've spent more time thinking about
> this than is particularly healthy, but that's me. Some people
> like bugs, other people collect stamps; I'm into Usenet loons.
You must be a very, very busy person.
--
Clinton A. Pierce Teach Yourself Perl in 24 Hours!
clintp@geeksalad.org for details see http://www.geeksalad.org
"If you rush a Miracle Man,
you get rotten Miracles." --Miracle Max, The Princess Bride
------------------------------
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 3036
**************************************