[12937] in Perl-Users-Digest
Perl-Users Digest, Issue: 347 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Aug 3 10:07:28 1999
Date: Tue, 3 Aug 1999 07:05:16 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Tue, 3 Aug 1999 Volume: 9 Number: 347
Today's topics:
Re: [offtopic]RE:Quot St and the Jeop Gm <mike@crusaders.no>
Re: [was]Re: reg expression <flavell@mail.cern.ch>
Adding time <diffs@vsnl.com>
Re: Adding time (Mike Bristow)
Re: Announcement: "CRAP" <flavell@mail.cern.ch>
Re: Announcement: "CRAP" (Bart Lateur)
Attempt with Glob <itc@cloudnet.com>
Re: Attempt with Glob (Andreas Fehr)
Re: Attempt with Glob <itc@cloudnet.com>
Can perl use if control statement in other if control s <c8133594@comp.polyu.edu.hk>
Re: Can perl use if control statement in other if contr (Mike Bristow)
Re: Can perl use if control statement in other if contr <tchrist@mox.perl.com>
Re: Can perl use if control statement in other if contr (Michel Dalle)
checking disk space <dkm@cs.bham.ac.uk>
Re: checking disk space <gellyfish@gellyfish.com>
editing pdf files via perl soumitra557@my-deja.com
Re: Escaping HTML tags <garethr@cre.canon.co.uk>
formular data problem with Active Perl/NT <ap@andre-probst.de>
Help Please <chris.wilkinson@jacobsrimell.com>
Re: How can I know what modules are installed on server <rcadmus@amctheatres.com>
Re: how to check if scalar is blank? (Anno Siegel)
Re: How to Pass Dynamic Array Values to subroutines... (Anno Siegel)
Re: how to remove cr/lf ??? <s_jagadish@yahoo.com>
Re: Logical Construction (Anno Siegel)
Need Help Understanding a perl script <tech1@magicnet.net>
Re: Need Help Understanding a perl script <eedalf@eed.ericsson.se>
Re: Need Help Understanding a perl script (Michel Dalle)
Re: newbabie, file's of 24 lines? <jcetek@ezzi.net>
Re: newbabie, file's of 24 lines? <jcetek@ezzi.net>
Re: newbabie, file's of 24 lines? (Anno Siegel)
Re: newbabie, file's of 24 lines? (Andreas Fehr)
Re: Newbie Q: Removing files from a folder <gellyfish@gellyfish.com>
Perl & Win95 <thomas@dreamsister.de>
Re: Perl Begineer Question... (Anno Siegel)
Re: Perl Begineer Question... <revjack@radix.net>
Question of DBI: Statement Handle Methods <c8133594@comp.polyu.edu.hk>
Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 3 Aug 1999 14:18:45 +0200
From: "Trond Michelsen" <mike@crusaders.no>
Subject: Re: [offtopic]RE:Quot St and the Jeop Gm
Message-Id: <N6Bp3.169$%25.936@news1.online.no>
> In article <37a633ad@cs.colorado.edu>,
> tchrist@mox.perl.com (Tom Christiansen) wrote:
> > The following message will be posted periodically until observed
> > clue-levels in these parts improve, or until the heat death of the
> > Universe arrives.
<llornkcor@my-deja.com> wrote in message news:7o5ure$s99$1@nnrp1.deja.com...
> From Webster's Revised Unabridged Dictionary (1913) (web1913)
> >>>>***This is the important part, Tom...***<<<<
> NOTE: Often used ironically, implying an assumption of superiority.
uhm - the message may very well have been condescending, but you should've
read it.
--
Trond Michelsen
------------------------------
Date: Tue, 3 Aug 1999 12:26:24 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: [was]Re: reg expression
Message-Id: <Pine.HPP.3.95a.990803122407.13690D-100000@hpplus03.cern.ch>
On Tue, 3 Aug 1999 llornkcor@my-deja.com Jeopardized the group with:
> and I wonder how many people have come here, seeking knowlege about
> perl, and asked a simple question, and have gotten back some rude
> non-answer from the 'regulars'?
You really are a pest. The group would be an incrementally better place
if you just kept quiet until you have gathered the glimmerings of a
clue. You might even learn something about Perl.
------------------------------
Date: Tue, 3 Aug 1999 19:05:52 +0530
From: "Murali V" <diffs@vsnl.com>
Subject: Adding time
Message-Id: <7o806u$rfr$1@news.vsnl.net.in>
Hi,
How do I add 2 hours to the epoch time with perl.
Thanks,
Murali
------------------------------
Date: Tue, 03 Aug 1999 14:01:13 GMT
From: mike@fat.dotat.at (Mike Bristow)
Subject: Re: Adding time
Message-Id: <slrn7qdth9.b2p.mike@lindt.fat.dotat.at>
On Tue, 3 Aug 1999 19:05:52 +0530, Murali V <diffs@vsnl.com> wrote:
>Hi,
>
>How do I add 2 hours to the epoch time with perl.
my $two_hours_from_now = time + (60*60*2);
Although if you're doing lots of date manipulation stuff,
look for the CPAN modules (I tend to use Date::Manip, but
there's lots of choice).
--
Mike Bristow, Geek-At-Large. GK/RT0038
one tequila - two tequila - three tequila - FLOOR !!!
------------------------------
Date: Tue, 3 Aug 1999 12:54:56 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Announcement: "CRAP"
Message-Id: <Pine.HPP.3.95a.990803124956.13690E-100000@hpplus03.cern.ch>
On 3 Aug 1999, Gisle Aas wrote:
> > Ahem! <URL:http://www.pobox.com/%7Ejaphy/perl/crap/>
>
> RFC 2396 made ~ unreserved. No need to escape it.
Right. It's still legal to escape it, though, and there's a number of
arguments in favour of doing so. I've been too lazy to do so on web
pages since even before rfc2396 legitimated it (and a number of
more-dubious practices), but outside of web pages it might still be wise
to consider escaping it. IMHO, of course.
OTOH it might be wise to avoid using it in URLs at all. Its
introduction was clearly by analogy with unix practice, but it does
cause a degree of user confusion, and I see that many WSPs are now
supporting different conventions for representing their users'
private web pages.
best regards
------------------------------
Date: Tue, 03 Aug 1999 11:19:05 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Announcement: "CRAP"
Message-Id: <37a7cfb7.17963440@news.skynet.be>
Abigail wrote:
>,, RFC 2396 made ~ unreserved. No need to escape it.
>
>True, due to the sillyness of NCSA and lusers not able to grasp the
>concept of escaping. But there was good reason RFC 1738 forbid the use
>of ~. Ever seen a ~ in, say, a newspaper? Did it look like one?
And yet, it is plain Ascii. This is a pure computer application, so
printing it on paper is irrelevant. It isn't reserved for some special
purpose. So, why the need to escape it?
Bart.
------------------------------
Date: Tue, 3 Aug 1999 06:55:35 -0500
From: "Steve" <itc@cloudnet.com>
Subject: Attempt with Glob
Message-Id: <BPAp3.101$H_3.12897@ptah.visi.com>
@result = glob("*.*");
while (<*.*>) { statements };
@result = glob("$dir\*.*");
@result = glob("$dir/*.*");
--- Bad command or file name
I tried all kinds of variations on the above as state in
the manuals but always get the message
"bad command or file name". I'm using ActiveState's
download on a windows 98 machine.
Can anyone tell me what I'm doing wrong ?
Thank you
Steve <itc@cloudnet.com> wrote in message
news:nxup3.70$H_3.7861@ptah.visi.com...
> I tried
>
> open(RES, " *.res") or die "Can't open results: $!/n";
>
> to read all files ending with .res
> Obviously this did not work.
>
> Is there anyway I can avoid hardcoding the file names in the
> program and also avoid manually cycling through each
> file ?
>
> Thank you
> Steve
> itc@cloudnet.com
>
>
>
------------------------------
Date: Tue, 03 Aug 1999 12:16:46 GMT
From: backwards.saerdna@srm.hc (Andreas Fehr)
Subject: Re: Attempt with Glob
Message-Id: <37a6dcf2.24729358@news.uniplus.ch>
On Tue, 3 Aug 1999 06:55:35 -0500, "Steve" <itc@cloudnet.com> wrote:
>
>@result = glob("*.*");
>while (<*.*>) { statements };
>@result = glob("$dir\*.*");
>@result = glob("$dir/*.*");
>
>
>--- Bad command or file name
>
What line gave you the above error message??
What do you get if you run:
while (<*.*>) { print $_, "\n";}
Andreas
------------------------------
Date: Tue, 3 Aug 1999 08:17:25 -0500
From: "Steve" <itc@cloudnet.com>
Subject: Re: Attempt with Glob
Message-Id: <s_Bp3.109$H_3.14035@ptah.visi.com>
OH to answer your other question.
every line that I refer to *.* I get
the error message.
Andreas Fehr <backwards.saerdna@srm.hc> wrote in message
news:37a6dcf2.24729358@news.uniplus.ch...
> On Tue, 3 Aug 1999 06:55:35 -0500, "Steve" <itc@cloudnet.com> wrote:
>
> >
> >@result = glob("*.*");
> >while (<*.*>) { statements };
> >@result = glob("$dir\*.*");
> >@result = glob("$dir/*.*");
> >
> >
> >--- Bad command or file name
> >
>
> What line gave you the above error message??
>
> What do you get if you run:
> while (<*.*>) { print $_, "\n";}
>
> Andreas
------------------------------
Date: Tue, 03 Aug 1999 21:10:46 +0800
From: Carfield Yim <c8133594@comp.polyu.edu.hk>
Subject: Can perl use if control statement in other if control statement?
Message-Id: <37A6EA56.2C743DE5@comp.polyu.edu.hk>
Can perl use if control statement in other if control statement?
i.e.: if (...) {
if (...){...}
else (...){...}
} elsif ....
I think it should be okay,
but I have compile time error of this, then I take a look of perlman,
there are no example of this. Is it illegal in perl?
------------------------------
Date: Tue, 03 Aug 1999 13:39:23 GMT
From: mike@fat.dotat.at (Mike Bristow)
Subject: Re: Can perl use if control statement in other if control statement?
Message-Id: <slrn7qds8b.b2p.mike@lindt.fat.dotat.at>
On Tue, 03 Aug 1999 21:10:46 +0800, Carfield Yim <c8133594@comp.polyu.edu.hk> wrote:
>Can perl use if control statement in other if control statement?
>i.e.: if (...) {
> if (...){...}
> else (...){...}
> } elsif ....
>
>I think it should be okay,
>but I have compile time error of this, then I take a look of perlman,
>there are no example of this. Is it illegal in perl?
If's in if's is leagal. Post your code, and we'll tell you where you
went wrong. From the above, my best guess is that you don't
have a condition after the elsif, but there are far too many `...'s
to be sure.
$ perl
if (1 == 2) {
if (3 ==4) {
print "Wow, man\n";
} else {
print "Not quite as wow, man\n";
}
} elsif (1 == 1) {
print "Everything is normal\n";
}
^D
Everything is normal
$
--
Mike Bristow, Geek-At-Large. GK/RT0038
one tequila - two tequila - three tequila - FLOOR !!!
------------------------------
Date: 3 Aug 1999 07:46:43 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Can perl use if control statement in other if control statement?
Message-Id: <37a6f2c3@cs.colorado.edu>
[courtesy cc of this posting mailed to cited author]
In comp.lang.perl.misc,
Carfield Yim <c8133594@comp.polyu.edu.hk> writes:
:Can perl use if control statement in other if control statement?
% man perlsyn
--tom
--
If you want your program to be readable, consider supplying the argument.
--Larry Wall in the perl man page
------------------------------
Date: Tue, 03 Aug 1999 14:02:13 GMT
From: michel.dalle@usa.net (Michel Dalle)
Subject: Re: Can perl use if control statement in other if control statement?
Message-Id: <7o6ssm$t5$1@news.mch.sbs.de>
In article <37A6EA56.2C743DE5@comp.polyu.edu.hk>, Carfield Yim <c8133594@comp.polyu.edu.hk> wrote:
>Can perl use if control statement in other if control statement?
>i.e.: if (...) {
> if (...){...}
> else (...){...}
> } elsif ....
>
[snip]
Read perlsyn (syntax) and perlstyle (style) too.
if (...) {
if (...) {
...
}
else {
...
}
}
elsif (...) {
...
}
Michel.
------------------------------
Date: Tue, 3 Aug 1999 13:49:26 +0100
From: David <dkm@cs.bham.ac.uk>
Subject: checking disk space
Message-Id: <Pine.SOL.3.96.990803134802.8032A-100000@dipsy>
I am trying to write a simple script which will check how much space is
left on a drive and give me a message or mail me when it reaches close to
its capacity, any surgestions?
with thanks
david
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: 2.6.3ia
mQA9AzZ5LrQAAAEBgNSGp8fXJaJv7JZiXdq7RBMtCQABctyeFeK/8aormhnwOMsz
OhZBYAUXO56zAo98oQAFEbQNRGF2aWQgTWljaGF1eIkARQMFEDZ5LrQXO56zAo98
oQEB5VUBgM80QFnM/MDfE+w00JK9BXuiSbnfk4BGe09zk+LsBqtqWTAvd5LIfWxi
0SLU9up0Yg==
=GHyU
-----END PGP PUBLIC KEY BLOCK-----
------------------------------
Date: 3 Aug 1999 14:31:18 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: checking disk space
Message-Id: <37a6ef26_2@newsread3.dircon.co.uk>
David <dkm@cs.bham.ac.uk> wrote:
>
> I am trying to write a simple script which will check how much space is
> left on a drive and give me a message or mail me when it reaches close to
> its capacity, any surgestions?
>
I posted a snippet in :
<http://www.deja.com/[ST_rn=ps]/getdoc.xp?AN=395163149&fmt=text>
/J\
--
"I came on the train but I think I managed to pass it off as an asthma
attack" - Jenny Eclair
------------------------------
Date: Tue, 03 Aug 1999 10:35:27 GMT
From: soumitra557@my-deja.com
Subject: editing pdf files via perl
Message-Id: <7o6glf$85b$1@nnrp1.deja.com>
Hello.
I have a pdf file .
I want to change some string within the file.
i.e. say the text in the pdf file has "abc woke up at 09 a.m."
I want to make it
"abc woke up at 11 a.m."
Is there a perl program which can do this for me.
Ideally it should
1.take a search string and a replace string.
2.Open a pdf file and apply the search and replace strings.
Please help.
Thanks
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Tue, 3 Aug 1999 10:29:41 GMT
From: Gareth Rees <garethr@cre.canon.co.uk>
Subject: Re: Escaping HTML tags
Message-Id: <siwvvd40oa.fsf@cre.canon.co.uk>
Karl Ahlin <karah@ida.liu.se> wrote:
> Is there a way to escape HTML tags?
Use `encode_entities' from the module HTML::Entities (distributed with
LWP).
--
Gareth Rees
------------------------------
Date: Tue, 03 Aug 1999 14:54:15 +0100
From: Andre Probst <ap@andre-probst.de>
Subject: formular data problem with Active Perl/NT
Message-Id: <37A6F486.747D6269@andre-probst.de>
Hi!
My script should evaluate formular data
with
read( STDIN, $buf, $ENV{'CONTENT_LENGTH'} );
%FELDER = &parse_cgi( $buf );
Under LINUX all works fine, under Active Perl for NT the formular
data which is received by the perl-script is always empty.
I am using Apache 1.3.6. Is it misconfigured ?
What could I change ?
Andre
________________________________________________
Homepage: http://www.andre-probst.de
kostenlose Börsenkurse täglich per e-mail
stock quotations per daily e-mail -- free of charge !
------------------------------
Date: Tue, 03 Aug 1999 13:02:27 +0100
From: Chris Wilkinson <chris.wilkinson@jacobsrimell.com>
Subject: Help Please
Message-Id: <37A6DA53.93C13842@jacobsrimell.com>
Hi All
Im new to this so please bear with me
I Have a perl script wrote by someone else and want to modify it. On 2
lines of the code it says
print GETF "set ssuser=cwilkinson\n";
print GETF "set sspwd=cwilkinson\n";
This is the username and password for an application where the scripts
needs to get some data from. Now what I want to do is to be able to
prompt for a username and then a password instead of having it hardcoded
into the script
Like I said im very new to this so any ideas would be helpful but try
not to be too techy about it as I only downloaded Perl this morning.
Chris
------------------------------
Date: Tue, 03 Aug 1999 08:18:14 -0500
From: Ray Cadmus <rcadmus@amctheatres.com>
Subject: Re: How can I know what modules are installed on server?
Message-Id: <37A6EC16.6C997AE4@amctheatres.com>
"99% Energy" wrote:
> How can I tell what modules are installed on a server? How can I replicate
> the library enviroment in my machine so it is the same as on the server so I
> won't run into these type of complications?
I found this somewhere (probably on this newsgroup). Sorry, I don't have the
author's name.
Anyway, if the server has a couple basics this will dump the environment via
your browser.
#!/perl/bin/perl -w
use lib '.';
use CGI;
use File::Find;
use strict;
my $page = CGI->new;
print $page->header, "\n";
print $page->start_html(-dtd=>'-//W3C//DTD HTML 4.0 Transitional//EN',
-title=>"Perl Environment: $ENV{SERVER_NAME}"), "\n";
print $page->h1("Perl Environment: $ENV{SERVER_NAME}"), "\n";
print $page->p("Perl Version: $]"), "\n";
print $page->p("CGI.pm Version: $CGI::VERSION"), "\n";
print $page->p("Library Path (\@INC):"), "\n";
print $page->ul($page->li([@INC])), "\n";
print $page->p('Modules:'), "\n";
my @mods;
my $list;
my $dir;
foreach $_ (@INC)
{
@mods = ();
$dir = $_;
find(\&wanted, $_);
$list .= $page->ul($page->li("$dir"),
$page->ul($page->li([sort @mods])));
}
print $list, "\n";
sub wanted
{
return unless /\.pm$/;
push @mods, $File::Find::name;
}
------------------------------
Date: 3 Aug 1999 10:22:30 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: how to check if scalar is blank?
Message-Id: <7o6ft6$9qq$1@lublin.zrz.tu-berlin.de>
<psdsp@my-deja.com> wrote in comp.lang.perl.misc:
>
>> seems trivial but wondering how to check if a scalar is blank, i.e.
>> has no value....this is what I have so far...
>> --8<---
>> sub is_blank {
>> local($var) = @_;
>> if ($var eq "") {
>> print "$var string is blank\n"; #debug
>> }
>> if ($var eq "0") {
>> print "$var is zero\n"; #debug
>> }
>> if (!defined $var) {
>> print "$! $filename: the variable $var is undefined\n";
>> }
>> }
>>
>> Does this covers all cases?
>> -hoz
>>
>
>Pls. refer to camel book page 21 for the rules determining
>whether a scalar is true.
>
>The string "", "0", and undefined values are false.
>So, you can just write
So far so good.
>if (!$var) {
> print "$! $filename: the variable is undefined\n";
>}
Now you're blurring the image, testing for false but claiming
"undefined" in the print statement.
>Dont use $var in print statement. Anyway it is undefined.
No. It *may* be undefined, but you're forgetting the other
cases.
>Hope that helps.
Not too much, I'm afraid.
Anno
------------------------------
Date: 3 Aug 1999 11:54:14 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: How to Pass Dynamic Array Values to subroutines...
Message-Id: <7o6l96$a3n$1@lublin.zrz.tu-berlin.de>
<kkmmperl@my-deja.com> wrote in comp.lang.perl.misc:
>Hi,
> My Problem is like this. I have a generic subroutine, that
>takes an Array and performs some Manipulation returns an Array.
>I call this subroutine as
>
>@outputarray=&subroutine(\@inputarray);
Your code (which I snipped) doesn't show how you deal with subroutine
parameters. This seems to be the crux of the matter, since you go on:
>When I tested the program with just the one array with the same array
>name used in the subroutine called, this program works properly. When
>the foreach loop was introduced and the subroutines use the $_ operator
$_ isn't an operator. It's the default variable used by a number
of perl operators. It has no particular significance with respect
to subroutines.
Look at perldoc perlsub, and especially what it has to say about
the parameter list @_.
Anno
------------------------------
Date: Tue, 03 Aug 1999 12:43:21 +0000
From: S Jagadish <s_jagadish@yahoo.com>
Subject: Re: how to remove cr/lf ???
Message-Id: <37A6E3E9.C9087812@yahoo.com>
> $outbuffer =~ s/\n/;/g;
> print FILETO $outbuffer;
>
> (This assumes your machine treats \n as CR-LF. This is the case if you're
> on a PC.)
my machine seems to treat cr-lf as \r so i guess
s/\r\n/\n/g; would be ok too
interestingly this seems to happen most when i use a textarea field
to get input
jagadish
------------------------------
Date: 3 Aug 1999 13:14:58 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Logical Construction
Message-Id: <7o6q0i$abb$1@lublin.zrz.tu-berlin.de>
Samay <anonymous@web.remarq.com> wrote in comp.lang.perl.misc:
>Well, yes that's exactly what I want to do.
>the only problem is that MY foreach construct is very long.
>so, I just want to put it in some type of subroutine and
>whenever I call, I just want to get the next item.
>Typically what you said about subroutine is true that it
>will return the first item only everytime. I am just
>thinking of tweaking it someway to return next item and not
>the first item all time. In the while construct I would
>like to have returned NULL type of thing if there's no more
>data.
From your description it looks like you want a closure. See
perldoc perlsub and other places for details. A basic example
looks like this:
#!/usr/bin/perl -w
use strict;
my $next_item = iterator( qw( fresh roast penguin));
while ( defined( my $x = &$next_item) ) {
print "$x\n";
}
sub iterator {
my @things = @_;
return sub {
shift @things;
}
}
__END__
Not that the variable @things is private to each incarnation of
an iterator. That means, you can have many of them and call them
in whatever sequence you want. Each one will iterate through its
set of @things unperturbed.
Anno
------------------------------
Date: Tue, 3 Aug 1999 08:04:48 -0400
From: "Diane" <tech1@magicnet.net>
Subject: Need Help Understanding a perl script
Message-Id: <rqdmtpoonnicq6@corp.supernews.com>
Hi All.
I need some help from one of you experts out there. I teach a web
development course which is mostly HTML that I know in my sleep. But, part
of the course discusses perl and cgi. I have a brief perl script that
basically just echoes back some form data. I have a basic understanding of
it but could use a more line by line explanation to offer to my class.
Any one interested in helping me out?
please email to:
tech1@magicnet.net
Thanks in advance..
Diane
------------------------------
Date: Tue, 03 Aug 1999 14:57:04 +0200
From: Alex Farber <eedalf@eed.ericsson.se>
To: Diane <tech1@magicnet.net>
Subject: Re: Need Help Understanding a perl script
Message-Id: <37A6E720.B9948A7F@eed.ericsson.se>
Hi Diane,
Diane wrote:
> I need some help from one of you experts out there. I teach a web
> development course which is mostly HTML that I know in my sleep.
:-)
> But, part of the course discusses perl and cgi. I have a brief perl script
> basically just echoes back some form data. I have a basic understanding of
> it but could use a more line by line explanation to offer to my class.
I would not stop just by knowing HTML - why don't you read a book on Perl?
"Learning Perl, 2nd Edition" is a good one and easy to read (will take you
a week or so) - see http://www.oreilly.com/catalog/lperl2/
Regards
Alex
--
Ich studiere Elektrotechnik (Technische Informatik) an der RWTH Aachen
und bin ein guter Perl-Programmierer (arbeite seit 4 Jahren als Intranet-
Entwickler). Kann auch C, Java, SQL, JavaScript und HTML, CGI und TCP/IP.
Ich suche eine gut bezahlte Diplomstelle in Koeln, Aachen oder Umgebung.
------------------------------
Date: Tue, 03 Aug 1999 12:50:01 GMT
From: michel.dalle@usa.net (Michel Dalle)
Subject: Re: Need Help Understanding a perl script
Message-Id: <7o6olb$qqk$1@news.mch.sbs.de>
In article <rqdmtpoonnicq6@corp.supernews.com>, "Diane" <tech1@magicnet.net> wrote:
>Hi All.
>
>I need some help from one of you experts out there. I teach a web
>development course which is mostly HTML that I know in my sleep. But, part
>of the course discusses perl and cgi. I have a brief perl script that
>basically just echoes back some form data. I have a basic understanding of
>it but could use a more line by line explanation to offer to my class.
>
>Any one interested in helping me out?
>
I would very much like to see that script. Can you post a copy ?
Assuming it's well written, it shouldn't be too long :-)
Michel.
------------------------------
Date: Tue, 3 Aug 1999 07:08:19 -0400
From: "ezzi" <jcetek@ezzi.net>
Subject: Re: newbabie, file's of 24 lines?
Message-Id: <o2Ap3.2666$mH2.282401@typ12.nn.bcandid.com>
hi
the file is a radius authentication database, with about 10,000 entrees @ 10
lines a peace, 25 or 42 wouldn't help ether,i needed infinite . I was think
about doing it in C++, i'm 4+ years strong in C on win32. i do all
devlopment on nt server 4.0.5, ftp to my linux box and tweak. i bought two
o'reilly books, learning perl and advanced perl , but the ex. are'nt deep
enought. thankz for your help with any docs. about the following questions
how do i compile the C code in linux?
how do i tell perl to use it the C progam?
thankz for the help so far.
------------------------------
Date: Tue, 3 Aug 1999 07:09:08 -0400
From: "ezzi" <jcetek@ezzi.net>
Subject: Re: newbabie, file's of 24 lines?
Message-Id: <93Ap3.2667$mH2.282433@typ12.nn.bcandid.com>
hi
the file is a radius authentication database, with about 10,000 entrees @ 10
lines a peace, 25 or 42 wouldn't help ether,i needed infinite . I was think
about doing it in C++, i'm 4+ years strong in C on win32. i do all
devlopment on nt server 4.0.5, ftp to my linux box and tweak. i bought two
o'reilly books, learning perl and advanced perl , but the ex. are'nt deep
enought. thankz for your help with any docs. about the following questions
how do i compile the C code in linux?
how do i tell perl to use it the C progam?
thankz for the help so far.
------------------------------
Date: 3 Aug 1999 11:17:27 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: newbabie, file's of 24 lines?
Message-Id: <7o6j47$a0t$1@lublin.zrz.tu-berlin.de>
ezzi <jcetek@ezzi.net> wrote in comp.lang.perl.misc:
>hi
>the file is a radius authentication database, with about 10,000 entrees @ 10
>lines a peace, 25 or 42 wouldn't help ether,i needed infinite . I was think
The work on File::Infinite has run into severe problems. Anyone care
to donate another hard disk?
Anno
------------------------------
Date: Tue, 03 Aug 1999 11:45:53 GMT
From: backwards.saerdna@srm.hc (Andreas Fehr)
Subject: Re: newbabie, file's of 24 lines?
Message-Id: <37a6d627.22990658@news.uniplus.ch>
On Tue, 3 Aug 1999 07:08:19 -0400, "ezzi" <jcetek@ezzi.net> wrote:
>how do i compile the C code in linux?
No Perl.
>how do i tell perl to use it the C progam?
Try: perldoc perlembed
Andreas
------------------------------
Date: 3 Aug 1999 14:10:54 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Newbie Q: Removing files from a folder
Message-Id: <37a6ea5e_1@newsread3.dircon.co.uk>
Andrew Fry <andrewf@beausys.freeserve.co.uk> wrote:
> if (opendir(DIR,$foldername))
> {
> @filelist = grep { /\.$myext$/ } readdir(DIR);
> closedir(DIR);
> $numfound = $#filelist;
> if ($numfound > 0)
> {
> print @filelist;
> }
> # delete files...
> # $i = unlink(@filelist);
> print "Folder: $foldername, file [*.$myext], found $numfound,
> deleted $numdeleted.\n";
> }
> }
> }
>
Unless $foldername is actually your current directory this wont work -
you will need to provide the full path to your files: I will generally
do this kind of thing -
@filelist = map { $foldername . '/' . $_ } grep { /\.$myext$/} readdir(DIR);
/J\
--
"I suggest you apply some lubrication before any bending begins" -
Antoine de Caunes, Eurotrash
------------------------------
Date: Tue, 03 Aug 1999 13:28:59 GMT
From: "Thomas Fvrtsch" <thomas@dreamsister.de>
Subject: Perl & Win95
Message-Id: <v8Cp3.11697$J5.133194@c01read02-admin.service.talkway.com>
Hello,
I 've a small problem with Perl and Win95.
I am trying to write a small CGI - script. I'm using a HTTPD for Win95.
I start a command line program with perl, but I get the output of the
started program at the beginning of my HTML-file. How can I avoid the
output?
#!c:\perl\bin\perl
system("discwr.exe");
open (TESTDAT,"<test.dat");
print "<html> <head> <title>Test</title> <body>   <br>   <br>";
while (<TESTDAT>)
{
print "$_ <br>";
}
print "</body> </html>";
close (TESTDAT);
--
Posted via Talkway - http://www.talkway.com
Exchange ideas on practically anything (tm).
------------------------------
Date: 3 Aug 1999 13:19:09 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Perl Begineer Question...
Message-Id: <7o6q8d$acj$1@lublin.zrz.tu-berlin.de>
Abigail <abigail@delanet.com> wrote in comp.lang.perl.misc:
>Jimmy (c6635500@comp.polyu.edu.hk) wrote on MMCLXIII September MCMXCIII
>x
This must be one of your terser replies.
Anno
------------------------------
Date: 3 Aug 1999 13:50:20 GMT
From: revjack <revjack@radix.net>
Subject: Re: Perl Begineer Question...
Message-Id: <7o6s2s$1p3$1@news1.Radix.Net>
Keywords: Hexapodia as the key insight
Anno Siegel explains it all:
:Abigail <abigail@delanet.com> wrote in comp.lang.perl.misc:
:>x
:This must be one of your terser replies.
Did you *have* to quote the whole thing?
------------------------------
Date: Tue, 03 Aug 1999 21:09:40 +0800
From: Carfield Yim <c8133594@comp.polyu.edu.hk>
Subject: Question of DBI: Statement Handle Methods
Message-Id: <37A6EA14.62527842@comp.polyu.edu.hk>
I have a question of the return of fetchrow_arrayref and
fetchrow_hashref method. I have written a mod for general database
function. In one subroutine of this mod, the return value is statement
handle object ($sth).
When I use the fetchrow_arrayref method of this return value.
(i.e.:$sth -> fetchrow_arrayref). First time, it is okay, but in second
time, it return a error message, and I don't know why...
I wonder, do the address of the return address will change after
being called, but I don't sure. If yes, is there any other Module behave
like this? Please tell me.
------------------------------
Date: 1 Jul 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 1 Jul 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.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@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.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
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 347
*************************************