[22096] in Perl-Users-Digest
Perl-Users Digest, Issue: 4318 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Dec 28 14:05:43 2002
Date: Sat, 28 Dec 2002 11:05:07 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Sat, 28 Dec 2002 Volume: 10 Number: 4318
Today's topics:
Re: C Backend (Jeff Mott)
Re: C Backend <tassilo.parseval@post.rwth-aachen.de>
Re: C Backend (Jeff Mott)
Re: IE uploads result in zero length files using CGI.pm <mpapec@yahoo.com>
Re: IE uploads result in zero length files using CGI.pm <willis3140@com.yahoo>
Re: IE uploads result in zero length files using CGI.pm <phignuton@_#NOSPAM#_hotmail.com>
mysterious '1' appearing <argonhigh@hotmail.com>
Re: mysterious '1' appearing <argonhigh@hotmail.com>
Re: mysterious '1' appearing (Jay Tilton)
Newbie Reg. Exp. questions.. <invalid-email@melodyland.net>
Parse HTTP RESPONSE Headers Active Perl CGI <david.buckley@bit-solutions.co.uk>
Re: Parse HTTP RESPONSE Headers Active Perl CGI <nobull@mail.com>
Re: Parse HTTP RESPONSE Headers Active Perl CGI <gisle@ashn89ty262h.bc.hsia.telus.net>
Re: Processing \0xx in nonliteral strings <bramoshe@runslinux.net>
Re: qr, spliting.. <mpapec@yahoo.com>
Search <tabla44@yahoo.com>
Re: Search <jkeen@concentric.net>
Re: Search <mgjv@tradingpost.com.au>
Re: Search <jurgenex@hotmail.com>
Re: Search (Tad McClellan)
Re: The Superiority of PHP over Perl (=?iso-8859-1?q?M=E5ns_Rullg=E5rd?=)
Re: The Superiority of PHP over Perl <murat.uenalan@gmx.de>
Re: vbs from perl <bart.lateur@pandora.be>
Re: vbs from perl <ian@WINDOZEdigiserv.net>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 27 Dec 2002 22:04:48 -0800
From: jeffmott@twcny.rr.com (Jeff Mott)
Subject: Re: C Backend
Message-Id: <f9c0ce19.0212272204.627db795@posting.google.com>
Why would a Perl module require Visual C and the documentation not
mention it? I've also tried compiling my Perl source into bytecode.
perlcc -b test.pl
This starts off with "unknown option: b" and continues with the list
of missing libraries, and also gives the same "'cl' is not
recognized..." even though the translation to bytecode shouldn't
require C at all.
???
------------------------------
Date: 28 Dec 2002 08:36:08 GMT
From: "Tassilo v. Parseval" <tassilo.parseval@post.rwth-aachen.de>
Subject: Re: C Backend
Message-Id: <aujnpo$3rh$1@nets3.rz.RWTH-Aachen.DE>
Also sprach Jeff Mott:
> Why would a Perl module require Visual C and the documentation not
> mention it? I've also tried compiling my Perl source into bytecode.
Visual C is only needed for those perls compiled with this compiler. For
the perl on my Debian box I would need the gcc since it was compiled
with this one.
In case you wonder that you need a C compiler at all, this is implicated
in the docs: compiling something into a standalone executable always
requires a compiler.
> perlcc -b test.pl
>
> This starts off with "unknown option: b" and continues with the list
> of missing libraries, and also gives the same "'cl' is not
> recognized..." even though the translation to bytecode shouldn't
> require C at all.
'-b' is unknown and therefore ignored so it is the same as 'perlcc
script.pl'. To get the bytecode try 'perlcc -B script.pl'.
You should however not expect too much from perlcc. It's extremely
experimental and, as far as I know, no longer maintained.
Tassilo
--
$_=q!",}])(tsuJ[{@"tnirp}3..0}_$;//::niam/s~=)]3[))_$-3(rellac(=_$({
pam{rekcahbus;})(rekcah{lrePbus;})(lreP{rehtonabus;})(rehtona{tsuJbus!;
$_=reverse;s/sub/(reverse"bus").chr(32)/xge;tr~\n~~d;eval;
------------------------------
Date: 28 Dec 2002 10:17:12 -0800
From: jeffmott@twcny.rr.com (Jeff Mott)
Subject: Re: C Backend
Message-Id: <f9c0ce19.0212281017.16633a3f@posting.google.com>
> '-b' is unknown and therefore ignored so it is the same as 'perlcc
> script.pl'. To get the bytecode try 'perlcc -B script.pl'.
Is this an error in perldoc then, which uses a lowercase 'b'? And even
though it is experimental I'd still like to play with it a little.
perlcc -B test.pl
...
618: no such instruction ""
619: no such instruction ""
620: no such instruction ""
...
912: no such instruction ""
There were 912 assembly errors
CHECK failed--call queue aborted.
?!? I realize it's experimental, but does it work at all? Is there
something vital I'm missing?
------------------------------
Date: Sat, 28 Dec 2002 00:20:07 +0100
From: Matija Papec <mpapec@yahoo.com>
Subject: Re: IE uploads result in zero length files using CGI.pm
Message-Id: <tunp0vkjjbeaeior22c67teuurquqljv5g@4ax.com>
X-Ftn-To: Chris Kolosiwsky
Chris Kolosiwsky <phignuton@_No#SpAm#_hotmail.com> wrote:
>Can someone perhaps suggest a better way to do this that would work
>with IE and Netscape based browsers? The server is a RedHat 7.3 box
>running apache 1.3.22 with perl 5.6.0 and CGI.pm 2.89.
http://www.inet.hr/~mpapec/stuff/upload.zip
It isn't a better way but it should work(it doesn't use CGI.pm). I think
only limitation is one file per upload, and 2mb in size(u could change
that).
[fut c.l.p.m]
--
Matija
------------------------------
Date: Sat, 28 Dec 2002 04:04:52 GMT
From: w i l l <willis3140@com.yahoo>
Subject: Re: IE uploads result in zero length files using CGI.pm
Message-Id: <1r1q0v4rmm77292etk0i3pnqmohgnr1mof@4ax.com>
If you use strict, then Perl will complain when you try to use a
string as a filehandle. You can get around this by placing the file
reading code in a block containing the no strict pragma. More
seriously, it is possible for the remote user to type garbage into the
upload field, in which case what you get from param() is not a
filehandle at all, but a string.
To be safe, use the upload() function (new in version 2.47). When
called with the name of an upload field, upload() returns a
filehandle, or undef if the parameter is not a valid filehandle.
$fh = $query->upload('uploaded_file');
while (<$fh>) {
print;
}
This is the recommended idiom.
from CGI manpage from activestate.
F:\usr\bin\perl5.6.1\html\index.html
-W i l l
On Fri, 27 Dec 2002 14:24:16 -0600, Chris Kolosiwsky
<phignuton@_No#SpAm#_hotmail.com> wrote:
>Hello All...
>
>While I realize that the CGI.pm docs clearly state the following:
>
>"The file upload feature doesn't work with every combination of
>browser and server. The various versions of Netscape and Internet
>Explorer on the Macintosh, Unix and Windows platforms don't all seem
>to implement file uploading in exactly the same way. I've tried to
>make CGI.pm work with all versions on all platforms, but I keep
>getting reports from people of instances that break the file upload
>feature."
>
>I was wondering if there is a workaround for the following situation:
>
>A cgi script accepts a file name for upload. The script untaints the
>file name, munges it to a predetermined name and writes the file to
>disk.
>
>Using Mozilla, K-Meleon, Netscape, Phoenix, IE 5.1 for the Mac, and
>Galeon the file is uploaded and written just fine. However, using the
>dreaded IE (versions 5 and 6) for the PC results in a zero length
>file.
>
>I'm using the following syntax for the file open:
>
>open (UPLOADEDFILE, ">$uldir/$renamed");
>
>while (<$uploadedfile>)
> {
> print UPLOADEDFILE;
> }
>
>Can someone perhaps suggest a better way to do this that would work
>with IE and Netscape based browsers? The server is a RedHat 7.3 box
>running apache 1.3.22 with perl 5.6.0 and CGI.pm 2.89.
>
>I have searched Google Groups for someone with a similar problem, but
>no one seems to have the exact same problem. If this is something
>exceptionally obvious, I do apologize in advance. I think I've been
>looking at this problem for a little bit TOO long.
>
>Thanks
>
>Chris Kolosiwsky
------------------------------
Date: Sat, 28 Dec 2002 11:03:53 -0600
From: Chris Kolosiwsky <phignuton@_#NOSPAM#_hotmail.com>
Subject: Re: IE uploads result in zero length files using CGI.pm
Message-Id: <bnlr0v8ebifah3ts4ncef0d13e4p3j38mo@4ax.com>
On Sat, 28 Dec 2002 04:04:52 GMT, w i l l <willis3140@com.yahoo>
wrote:
>If you use strict, then Perl will complain when you try to use a
>string as a filehandle. You can get around this by placing the file
>reading code in a block containing the no strict pragma. More
>seriously, it is possible for the remote user to type garbage into the
>upload field, in which case what you get from param() is not a
>filehandle at all, but a string.
>
>To be safe, use the upload() function (new in version 2.47). When
>called with the name of an upload field, upload() returns a
>filehandle, or undef if the parameter is not a valid filehandle.
>
> $fh = $query->upload('uploaded_file');
> while (<$fh>) {
> print;
> }
>This is the recommended idiom.
I am using the upload function. As I said, I munge the name the user
inputs into the form into something else. The filename the user inputs
is untainted and then completely renamed like so:
c:\foo.txt => Client Name_date.extension
In the script the file is received from the form using this syntax:
my $uploadedfile = $q->upload('UploadedFile');
$uploadedfile =~ s/.*[\/\\](.*)/$1/;
# only grab the file after the last / in the pathname
After cleaning up the file name it is given a different name, but
opened under the UPLOADEDFILE fh...
>>open (UPLOADEDFILE, ">$uldir/$renamed");
>>
>>while (<$uploadedfile>)
>> {
>> print UPLOADEDFILE;
>> }
>>
Thus, just because the client has a file named "This is a stupid name
with spaces and @@$#$@@@ special chars.txt" doesn't mean that I'll
have that cluttering up my system. What I'll end up with is
"Poorlynamedfile_12282002.txt".
>from CGI manpage from activestate.
>F:\usr\bin\perl5.6.1\html\index.html
And that's where I got the info as well.
Chris
>
>-W i l l
>
>On Fri, 27 Dec 2002 14:24:16 -0600, Chris Kolosiwsky
><phignuton@_No#SpAm#_hotmail.com> wrote:
>
>>Hello All...
>>
>>While I realize that the CGI.pm docs clearly state the following:
>>
>>"The file upload feature doesn't work with every combination of
>>browser and server. The various versions of Netscape and Internet
>>Explorer on the Macintosh, Unix and Windows platforms don't all seem
>>to implement file uploading in exactly the same way. I've tried to
>>make CGI.pm work with all versions on all platforms, but I keep
>>getting reports from people of instances that break the file upload
>>feature."
>>
>>I was wondering if there is a workaround for the following situation:
>>
>>A cgi script accepts a file name for upload. The script untaints the
>>file name, munges it to a predetermined name and writes the file to
>>disk.
>>
>>Using Mozilla, K-Meleon, Netscape, Phoenix, IE 5.1 for the Mac, and
>>Galeon the file is uploaded and written just fine. However, using the
>>dreaded IE (versions 5 and 6) for the PC results in a zero length
>>file.
>>
>>I'm using the following syntax for the file open:
>>
>>open (UPLOADEDFILE, ">$uldir/$renamed");
>>
>>while (<$uploadedfile>)
>> {
>> print UPLOADEDFILE;
>> }
>>
>>Can someone perhaps suggest a better way to do this that would work
>>with IE and Netscape based browsers? The server is a RedHat 7.3 box
>>running apache 1.3.22 with perl 5.6.0 and CGI.pm 2.89.
>>
>>I have searched Google Groups for someone with a similar problem, but
>>no one seems to have the exact same problem. If this is something
>>exceptionally obvious, I do apologize in advance. I think I've been
>>looking at this problem for a little bit TOO long.
>>
>>Thanks
>>
>>Chris Kolosiwsky
------------------------------
Date: Fri, 27 Dec 2002 18:47:10 -0500
From: "James" <argonhigh@hotmail.com>
Subject: mysterious '1' appearing
Message-Id: <PD5P9.3961$Yo5.857129@news20.bellglobal.com>
I have this weird problem, for some reason the number '1' is being printed,
without it being printed using print. Here is the perl -d output for the
file. (relavent lines)
DB<7> s
main::header(login.cgi:157): print "Content-Type:
text/html;
charset=iso-8859-1\n\n";
DB<7> s
Content-Type: text/html; charset=iso-8859-1
1main::login(login.cgi:33): print qq|<!DOCTYPE HTML
PUBLIC "
-//W3C//DTD HTML 4.01 Transitional//EN">
main::login(login.cgi:34): <html>
If you look above, at the line right below the blank line, you should see a
'1' right before 'main::login.....'
Does it make sense (is it possible) for that '1' to appear there?, if so,
what could be some causes?
------------------------------
Date: Fri, 27 Dec 2002 19:17:28 -0500
From: "James" <argonhigh@hotmail.com>
Subject: Re: mysterious '1' appearing
Message-Id: <d46P9.3974$Yo5.862397@news20.bellglobal.com>
"James" <argonhigh@hotmail.com> wrote in message
news:PD5P9.3961$Yo5.857129@news20.bellglobal.com...
> I have this weird problem, for some reason the number '1' is being
printed,
> without it being printed using print. Here is the perl -d output for the
> file. (relavent lines)
>
>
[snip]
>
>
> If you look above, at the line right below the blank line, you should see
a
> '1' right before 'main::login.....'
> Does it make sense (is it possible) for that '1' to appear there?, if so,
> what could be some causes?
>
>
I figured it out..., I was using
print &header;
which was calling a su routine, which then printed out data (resulting in
header() returning 1;)
fixed the code to return, instead of print.
Sorry for wasting anyones time.
------------------------------
Date: Sat, 28 Dec 2002 00:30:02 GMT
From: tiltonj@erols.com (Jay Tilton)
Subject: Re: mysterious '1' appearing
Message-Id: <3e0cebee.251894908@news.erols.com>
"James" <argonhigh@hotmail.com> wrote:
: I have this weird problem, for some reason the number '1' is being printed,
: without it being printed using print. Here is the perl -d output for the
: file. (relavent lines)
:
: DB<7> s
: main::header(login.cgi:157): print "Content-Type:
: text/html;
: charset=iso-8859-1\n\n";
: DB<7> s
: Content-Type: text/html; charset=iso-8859-1
:
: 1main::login(login.cgi:33): print qq|<!DOCTYPE HTML
: PUBLIC "
: -//W3C//DTD HTML 4.01 Transitional//EN">
Where's the trailing quote delimiter ( '|' )?
: main::login(login.cgi:34): <html>
:
:
: If you look above, at the line right below the blank line, you should see a
: '1' right before 'main::login.....'
: Does it make sense (is it possible) for that '1' to appear there?, if so,
: what could be some causes?
Whatever the cause, that's not enough of the code to diagnose.
WAG - a print() somewhere is printing the return from another print().
Like, say,
#!perl -l
print "foo", # <-- comma should be semicolon
print "bar";
print "baz";
------------------------------
Date: Sun, 29 Dec 2002 02:29:55 +0800
From: "-SmC-" <invalid-email@melodyland.net>
Subject: Newbie Reg. Exp. questions..
Message-Id: <aukr4g$qvd$1@nobel.pacific.net.sg>
Think this is a simple question by i judy cant solve it...
Can anyone teach me how to validate IP address?
example checking for the correct format: 220.110.113.111
have 4 group of 3 number and each group not over 255 ?
Thanks alot
------------------------------
Date: Sat, 28 Dec 2002 14:54:41 -0000
From: "David Buckley" <david.buckley@bit-solutions.co.uk>
Subject: Parse HTTP RESPONSE Headers Active Perl CGI
Message-Id: <aukdvg$qvk$1@news5.svr.pol.co.uk>
I use a sms message gatway service on the net and have to use http post to
send the message but this just send me to their with codes for a message
being sent as sucessfully on unsucesfull. The code below is a actual
response which is sent back from the server
The format of the HTTP response
The Server will only respond back once the whole recipient list has been
processed. If the message is successfully sent to everyone on the list list
then the Server will respond with 01. If any of the numbers fail, it will
continue to process the list, but the Server will respond with a failure for
the last number that failed irrespective of how many numbers actually
failed.
The format of the response is as follows;
HTTP/1.1 200 OK
Date: Tue, 10 Dec 2002 14:33:38 GMT
Server: Apache/1.3.23 (Unix) (Red-Hat/Linux) mod_ssl/2.8.7 OpenSSL/0.9.6b
DAV/1.0.3 PHP/4.1.2 mod_perl/1.26 mod_fastcgi/2.2.12
Transfer-Encoding: chunked
Content-Type: text/html;
99
Below is the error message table i want to retrieve the 99 value i have
access to active perl on the server is there anyway of doing this and
display it in my own web page ?
01 OK - the message has been accepted by the It's Arrived server and
will be processed.
97 Parameter syntax error
99 Invalid Username or PIN
------------------------------
Date: 28 Dec 2002 16:43:43 +0000
From: Brian McCauley <nobull@mail.com>
Subject: Re: Parse HTTP RESPONSE Headers Active Perl CGI
Message-Id: <u9d6nmhz5s.fsf@wcl-l.bham.ac.uk>
"David Buckley" <david.buckley@bit-solutions.co.uk> writes:
> I use a sms message gatway service on the net and have to use http post to
> send the message but this just send me to their with codes for a message
> being sent as sucessfully on unsucesfull. The code below is a actual
> response which is sent back from the server
>
> The format of the HTTP response
> The Server will only respond back once the whole recipient list has been
> processed. If the message is successfully sent to everyone on the list list
> then the Server will respond with 01. If any of the numbers fail, it will
> continue to process the list, but the Server will respond with a failure for
> the last number that failed irrespective of how many numbers actually
> failed.
>
> The format of the response is as follows;
>
> HTTP/1.1 200 OK
> Date: Tue, 10 Dec 2002 14:33:38 GMT
> Server: Apache/1.3.23 (Unix) (Red-Hat/Linux) mod_ssl/2.8.7 OpenSSL/0.9.6b
> DAV/1.0.3 PHP/4.1.2 mod_perl/1.26 mod_fastcgi/2.2.12
> Transfer-Encoding: chunked
> Content-Type: text/html;
>
> 99
>
> Below is the error message table i want to retrieve the 99 value
Assuming the HTTP response is in an HTTP::Response mobject then its
content can be accessed using the content() method. If the response
is in some form other form I think you need to explain how your Perl
script is commumicating with the server.
But that doesn't look like a valid HTTP response - the
Transfer-Encoding says "chunked" but the entity body is not. Last I
knew LWP didn't implement HTTP/1.1 - specifically it didn't implement
"Transfer-Encoding: chunked".
> i have
> access to active perl on the server is there anyway of doing this and
> display it in my own web page ?
To print values on your web page then you must generate that page
using CGI or SSI or some other method that implements dynamic
content. You can use these mechanisms to call a Perl script (or
indeed any other kind of script).
------------------------------
Date: Sat, 28 Dec 2002 17:20:25 GMT
From: Gisle Aas <gisle@ashn89ty262h.bc.hsia.telus.net>
Subject: Re: Parse HTTP RESPONSE Headers Active Perl CGI
Message-Id: <m3u1gy5aau.fsf@ashn89ty262h.bc.hsia.telus.net>
Brian McCauley <nobull@mail.com> writes:
> > The format of the response is as follows;
> >
> > HTTP/1.1 200 OK
> > Date: Tue, 10 Dec 2002 14:33:38 GMT
> > Server: Apache/1.3.23 (Unix) (Red-Hat/Linux) mod_ssl/2.8.7 OpenSSL/0.9.6b
> > DAV/1.0.3 PHP/4.1.2 mod_perl/1.26 mod_fastcgi/2.2.12
> > Transfer-Encoding: chunked
> > Content-Type: text/html;
> >
> > 99
[...]
> But that doesn't look like a valid HTTP response - the
> Transfer-Encoding says "chunked" but the entity body is not. Last I
> knew LWP didn't implement HTTP/1.1 - specifically it didn't implement
> "Transfer-Encoding: chunked".
HTTP/1.1 and 'Transfer-Encoding: chunked' has been supported for since
LWP-v5.60 which was released October 2001.
--
Gisle Aas
------------------------------
Date: Sat, 28 Dec 2002 02:12:22 +0000 (UTC)
From: Moshe Jacobson <bramoshe@runslinux.net>
Subject: Re: Processing \0xx in nonliteral strings
Message-Id: <auj1a6$fet$1@news-int.gatech.edu>
Benjamin Goldberg had nothing better to do than to say:
> I am posting a followup to my own message due to Andrew Hamm asking for
> an explanation of my code.
Well thank you Ben, that was almost painfully detailed, but I did
learn some very neat things from it.
Cheers,
Moshe
--
*** SPAM BLOCK: Remove bra before replying! ***
Moshe Jacobson :: http://runslinux.net :: moshe at runslinux dot net
!! FBI Arreseting Programmers? http://www.freesklyarov.org
!! Trust Microsoft Anti-Trust: http://www.anti-dmca.org
------------------------------
Date: Sat, 28 Dec 2002 01:00:41 +0100
From: Matija Papec <mpapec@yahoo.com>
Subject: Re: qr, spliting..
Message-Id: <rspp0vc2pu9ud4fpmb2pnojlid919722fc@4ax.com>
anno4000@lublin.zrz.tu-berlin.de (Anno Siegel) wrote:
>> are there some benefits when using split and user field separator defined
>> within qr?
>
>Benefits compared to what?
Comparing &SSort(\@str, qr/\|\|/, -1) to &SSort(\@str, '\|\|', -1)
>A more conventional approach would split both sets of strings once (on
>input, if they come from files), then sort the array of arrays as required,
>and probably recover the strings only for output. That way you do
>"openly" what happens in the Schwartz Transform anyway and put it in a
>sequence that is easier to follow. You also get the responsibility for
>splitting the input out of the sort routine, which is a good thing.
Hm, I somehow prefer "black box" approach.
>> I would also like to implement parameters which should tell
>> subroutine what to do with sorting instances, i.e. when calling something
>> like:
>>
>> &SSort(x,x,x, \uc);
>
>Ugh. SSort() is suffering from hyper-parametosis already :)
Well, it's a common disease when you want greater functionality. ;)
>> SSort should be somehow able to call 'uc' upon $a->[1] and $b->[1]
>
>Well, you can't take references to Perl operators, the smallest unit of
>code is a block, disguised as a sub. If you must, you can write "sub
>{ uc shift }" and use the coderef as you please in the sorting routine,
Tnx, I'll try that.
>but the design would improve if SSort() got rid of parameters instead
>of acquiring new ones.
I'll try that too.
>Thirdly, there are modules on CPAN that deal with this kind of data.
>Look for the keyword "csv" (comma-separated values) to find them. Without
>having looked at them in detail I'd expect you to find much of the
>functionality you are implementing.
Tnx, but this isn't optional for me as I don't have access to installing
modules on web server.
>The code I snipped looks like a correct application of the ST to me
>(without running it). My only remarks are, don't call subroutines
>as "&SSort(\@str, qr/\|\|/, -1)" unless you know what the ampersand
>does.
Tells Perl it's a sub when () are absent?
>It doesn't make much of a difference here, but may make a dramatic
>one if prototypes are involved.
Don't know much about them, are they still experimental?
--
Matija
------------------------------
Date: Sat, 28 Dec 2002 03:20:59 GMT
From: Edo987 <tabla44@yahoo.com>
Subject: Search
Message-Id: <MPG.1876d48eadefb226989680@netnews.insightbb.com>
I have many subfolders with text files and I need search file name, list
results and download searched files.
------------------------------
Date: 28 Dec 2002 03:48:03 GMT
From: "James E Keenan" <jkeen@concentric.net>
Subject: Re: Search
Message-Id: <auj6tj$833@dispatch.concentric.net>
"Edo987" <tabla44@yahoo.com> wrote in message
news:MPG.1876d48eadefb226989680@netnews.insightbb.com...
> I have many subfolders with text files and I need search file name, list
> results and download searched files.
Okay. Show us the Perl code which you have attempted so far.
------------------------------
Date: Sat, 28 Dec 2002 14:55:47 +1100
From: Martien Verbruggen <mgjv@tradingpost.com.au>
Subject: Re: Search
Message-Id: <slrnb0q863.4tt.mgjv@martien.heliotrope.home>
On Sat, 28 Dec 2002 03:20:59 GMT,
Edo987 <tabla44@yahoo.com> wrote:
> I have many subfolders with text files and I need search file name, list
> results and download searched files.
See my response in clp.modules.
Please, if you must post the same question to multiple groups, use the
cross-posting feature of your usenet client software.
Martien
--
|
Martien Verbruggen |
| Can't say that it is, 'cause it ain't.
|
------------------------------
Date: Sat, 28 Dec 2002 05:50:48 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: Search
Message-Id: <YYaP9.6041$ac.4381@nwrddc01.gnilink.net>
Edo987 wrote:
> I have many subfolders with text files and I need search file name,
> list results and download searched files.
Are you looking for the File::Find module?
jue
------------------------------
Date: Sat, 28 Dec 2002 00:34:44 -0600
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Search
Message-Id: <slrnb0qhg4.69n.tadmc@magna.augustmail.com>
Edo987 <tabla44@yahoo.com> wrote:
> I have many subfolders with text files and I need search file name, list
> results and download searched files.
OK.
Did you have a question that you wanted to ask?
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: 28 Dec 2002 11:31:24 +0100
From: mru@users.sourceforge.net (=?iso-8859-1?q?M=E5ns_Rullg=E5rd?=)
Subject: Re: The Superiority of PHP over Perl
Message-Id: <yw1xznqqigeb.fsf@gladiusit.e.kth.se>
Benjamin Goldberg <goldbb2@earthlink.net> writes:
> > > > I bang my head nearly weekly against my monitor, because
> > > > *nix-vs-win compability.
> > >
> > > What kind of incompatibility? If it's because of [lack of] using
> > > binmode() on those filehandles which contain binary data, then I
> > > would *not* in any way consider it perl's fault -- it's
> > > ignorance/stupidity.
> >
> > Yes, the ignorance of the authors of MSWindows. I believe that if
> > they would choose to switch to sane behavior regarding line ends, the
> > only ones that would even notice would be happy about it.
>
> And how does this solve compatability problems for the X million people
> who have the current versions of windows? Sure, if they introduced a
> new version with sane line endings, that would be nice, but that will
> only help those who install that new windows.
M$ are usually good at forcing people to upgrade.
> Also, binmode() isn't *only* for line-endings. The newest versions of
> RedHat Linux have the LANG environment variable set to utf8, meaning
> that every program which deals with text needs to deal with utf8
> characters, *not* bytes. By default, perl opens files in text mode. If
> your LANG indicates that text files are utf8, then perl puts a ":utf8"
> encoding layer onto every file opened in text mode -- which is vital if
> you're printing text to that handle, but probably disastrous if your
> data is binary stuff. In other words, on RedHat, you need to binmode
> your filehandles the same as you would on Windows, or else your data
> will be corrupted.
I've never liked redhat.
--
Måns Rullgård
mru@users.sf.net
------------------------------
Date: Sat, 28 Dec 2002 16:25:05 +0100
From: "Murat Ünalan" <murat.uenalan@gmx.de>
Subject: Re: The Superiority of PHP over Perl
Message-Id: <aukfpa$pbq$07$1@news.t-online.com>
> It is a method, no matter how you call it. In Perl there is simply no
> distinction between a class method, an instance method and a function
> caller-wise. Weren't it a method, you couldn't do the following:
>
> $object->printHello;
>
> But you can also do:
>
> A->printHello;
I regret to reject this. A method is something which relates to its
class/object.
Because perl does oo-things indirectly via packagenames this doesnt mean
that
everything in a package is related to oo-class-things.
Or would you say everything in main:: or CORE:: is a method of it.
Or what about that:
package A;
sub i_am_for_all
{
my $string = shift;
$string || 'EMPTY';
}
This does stupid things when called via the method-syntax
A->i_am_for_all( $var );
because it isn't a method, thats why you explicitly say A::i_am_for_all(
$var ).
> You are right here. There is no way to get to the data when for instance
> closures are used. That might have been done on purpose to prevent
> people from peeking into the object. Yet this is rather uncommon in the
> world of Perl: freedom to do whatever you want is preferred in the world
> of Perl (even if it is freedom to shoot yourself into the leg).
Ok, i love the liberality of perl. But perl lacks a clean (flexible)
decleration which
give you hints about the structure of the introspected objects. Which would
be
really diserable for many purposes.
Perl hasn't got something powerfull like Javas reflection.
Murat
------------------------------
Date: Sat, 28 Dec 2002 10:02:29 GMT
From: Bart Lateur <bart.lateur@pandora.be>
Subject: Re: vbs from perl
Message-Id: <7htq0v8h86l8k3cq7vk4uhtpsq3tdop8co@4ax.com>
Janne Saarinen / HTV wrote:
>is it possible to run allkind vbscript commands from perl scripts?
>vbs script cant build to exe, this is my major problem.
With system(), you can launch any file, but it might require using the
program "start".
system('start', 'yourvbscript.vbs');
Let me see... VBS files are associated with a program called "WSCRIPT",
so
system('WSCRIPT', 'yourvbscript.vbs');
is worth trying out as well.
HTH,
Bart.
------------------------------
Date: Sat, 28 Dec 2002 10:06:34 GMT
From: "Ian.H [dS]" <ian@WINDOZEdigiserv.net>
Subject: Re: vbs from perl
Message-Id: <8rtq0v0boknsi2376chv0cg2oe9v3ebs8h@4ax.com>
Keywords: Remove WINDOZE to reply
-----BEGIN xxx SIGNED MESSAGE-----
Hash: SHA1
In a fit of excitement on Sat, 28 Dec 2002 10:02:29 GMT, Bart Lateur
<bart.lateur@pandora.be> managed to scribble:
> Janne Saarinen / HTV wrote:
>
> >is it possible to run allkind vbscript commands from perl scripts?
>
> >vbs script cant build to exe, this is my major problem.
>
> With system(), you can launch any file, but it might require using
> the program "start".
>
> system('start', 'yourvbscript.vbs');
>
> Let me see... VBS files are associated with a program called
> "WSCRIPT", so
>
> system('WSCRIPT', 'yourvbscript.vbs');
>
> is worth trying out as well.
>
CSCRIPT is probably your best bet rather than WSCRIPT for this instance
as it's the console version of the WSH.
Regards,
Ian
-----BEGIN xxx SIGNATURE-----
Version: PGP Personal Privacy 6.5.3
iQA/AwUBPg13o2fqtj251CDhEQJ/FwCfd846CNSTClqNgvxMMKXp4QGEspkAoNdo
5Y/vSq8InlepRMBabzbOnQ0D
=9Bee
-----END PGP SIGNATURE-----
--
Ian.H [Design & Development]
digiServ Network - Web solutions
www.digiserv.net | irc.digiserv.net | forum.digiserv.net
Scripting, Web design, development & hosting.
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
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.
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 V10 Issue 4318
***************************************