[18622] in Perl-Users-Digest
Perl-Users Digest, Issue: 790 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Apr 28 18:05:38 2001
Date: Sat, 28 Apr 2001 15:05:09 -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: <988495509-v10-i790@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Sat, 28 Apr 2001 Volume: 10 Number: 790
Today's topics:
Re: "return" from a "require"? <ren@tivoli.com>
Re: "return" from a "require"? (Rudolf Polzer)
Re: [Very OT] Sex and apathy <miltonroad@btinternet.com>
Re: [Very OT] Sex and apathy <miltonroad@btinternet.com>
Re: Appending to files and flock. <taka@yarn.demon.co.uk>
Re: Appending to files and flock. <taka@yarn.demon.co.uk>
Re: Boole's tools (was Things I'm just not getting in P (Rudolf Polzer)
Can't locate object method with @ISA <lueder@gmx.at>
Re: Can't locate object method with @ISA <bart.lateur@skynet.be>
Re: creating an array of all filenames <andras@mortgagestats.com>
Re: creating an array of all filenames (Abigail)
Re: dynamic creation of classes? (Anno Siegel)
Re: dynamic creation of classes? (Rudolf Polzer)
Re: dynamic creation of classes? (Anno Siegel)
Re: dynamic creation of classes? <bart.lateur@skynet.be>
Re: First and last element in list loop <ren@tivoli.com>
Re: First and last element in list loop <uri@sysarch.com>
Re: First and last element in list loop <uri@sysarch.com>
Re: First and last element in list loop (Anno Siegel)
Re: Good editor for perl <michael@stroeck.com>
Re: Good editor for perl <keesh@users.pleaseremovethisbit.sourceforge.net>
Re: help me <flavell@mail.cern.ch>
Re: help me <andras@mortgagestats.com>
Re: help me <comdog@panix.com>
Re: help me <flavell@mail.cern.ch>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 27 Apr 2001 21:14:28 -0500
From: Ren Maddox <ren@tivoli.com>
Subject: Re: "return" from a "require"?
Message-Id: <m33dathit7.fsf@dhcp9-172.support.tivoli.com>
On Sat, 28 Apr 2001, bart.lateur@skynet.be wrote:
> xris wrote:
>
>>> Yes, and it's remarkably like when you return() from a subroutine.
>>> What you do is you return() from the file.
>>
>>ah, weird. I seem to remember that not working when I tried it
>>years ago. maybe it was just a weird version of perl. guess I'll
>>have to try again (I didn't really need the code, but thought it
>>might be nice to have at some point down the road).
>
> I would have doubts myself, because it most definitely doesn't work
> in the main script, so I don't trust it in a required file either.
There's no reason not to trust it:
return Returns from a subroutine, `eval', or `do FILE'
with the value given in EXPR.
and, just for good measure, the documentation for "require" includes:
"The file is included via the do-FILE mechanism..."
--
Ren Maddox
ren@tivoli.com
------------------------------
Date: Sat, 28 Apr 2001 20:39:53 +0200
From: eins@durchnull.de (Rudolf Polzer)
Subject: Re: "return" from a "require"?
Message-Id: <slrn9em3jp.2to.eins@www42.t-offline.de>
Ren Maddox <ren@tivoli.com> wrote:
> On Sat, 28 Apr 2001, bart.lateur@skynet.be wrote:
>
> > xris wrote:
> >
> >>> Yes, and it's remarkably like when you return() from a subroutine.
> >>> What you do is you return() from the file.
> >>
> >>ah, weird. I seem to remember that not working when I tried it
> >>years ago. maybe it was just a weird version of perl. guess I'll
> >>have to try again (I didn't really need the code, but thought it
> >>might be nice to have at some point down the road).
> >
> > I would have doubts myself, because it most definitely doesn't work
> > in the main script, so I don't trust it in a required file either.
>
> There's no reason not to trust it:
>
> return Returns from a subroutine, `eval', or `do FILE'
> with the value given in EXPR.
>
> and, just for good measure, the documentation for "require" includes:
> "The file is included via the do-FILE mechanism..."
Maybe he did a plain return (without the 1)?
--
#!/usr/bin/perl -W -- WARNING: This copies a random file from
use strict;my$s;my$n=0;for # the current directory to your
(<*>){++$n;int rand$n or$s # signature file. Use at your
=$_};`cp $s ~/.signature`; # own risk! (c) 2001 Rudolf Polzer
------------------------------
Date: Sat, 28 Apr 2001 15:29:16 +0100
From: Milton Road <miltonroad@btinternet.com>
Subject: Re: [Very OT] Sex and apathy
Message-Id: <QsAG6.143809$HR6.16206562@nnrp4.clara.net>
>
> NO need -- just go to CPAN and download Wank.pm.
>
It's a bold idea, but I'm guessing that the CPAN isn't as comprehensive as
you'd like.
Even if someone were to write such a module, I find it unlikely that the
constructor would be generic enough to cope with such a wide range of
inputs.
Also, the DESTROY method might be quite messy too.
Milton.
------------------------------
Date: Sat, 28 Apr 2001 15:31:48 +0100
From: Milton Road <miltonroad@btinternet.com>
Subject: Re: [Very OT] Sex and apathy
Message-Id: <avAG6.143814$HR6.16206904@nnrp4.clara.net>
Tim Hammerquist wrote:
> I've seen some strange threads in this group, but damn.
It'd prefer to think of this thread as a fairly nice burst of meaningless
wank.
> Ok, this was weak.
What was weak? If you don't give SPECIFIC examples of your problem how is
the group supposed to help you?
Milton.
------------------------------
Date: 28 Apr 2001 20:33:32 +0100
From: Paul the Nomad <taka@yarn.demon.co.uk>
Subject: Re: Appending to files and flock.
Message-Id: <874rv8bz03.fsf@euterpe.yarn.demon.co.uk>
nobull@mail.com writes:
> Paul the Nomad <taka@yarn.demon.co.uk> writes:
>
> > anno4000@lublin.zrz.tu-berlin.de (Anno Siegel) writes:
> >
> > > According to Paul the Nomad <taka@yarn.demon.co.uk>:
> > > > anno4000@lublin.zrz.tu-berlin.de (Anno Siegel) writes:
> > > [oops, lost an attribution there]
> > >
> > > > > > lock it. In fact, a quick look at my system's man page shows that the
> > > > > > C system call 'open' doesn't support locking. It does say, however,
> > > > > > that if two or more people try to append to a file at the same time it
> > > > > > could corrupt the file.
> > > > >
> > > > > Not if the individual bits written aren't exceedingly large. This has
> > > >
> > > > Sounds like programming by wishful thinking.
> > >
> > > Is Rabin/Miller prime testing programming by wishful thinking?
> > >
> > > It's called choosing the right tool for a task. Nothing stops
> > > you from additionally locking if the application is critical.
> >
> > This thread is really appalling.
>
> Yes, I know, it wasn't much better last time either (about 5 weeks
> ago). Perhaps if you'd gone read that thread you'd have saved us all
> a lot of grief.
Your answer below is absolutely brilliant and I've saved it for future
reference. Thanks.
For grief however, there is no need. No one *has* to read an article
or a thread and always has the killfile available.
>
> The interaction between locking, OSs that do or do not implement
> O_APPEND correctly, buffering and so on brings out the worst in
> people.
>
> > So far the totally inadequate answer I've got in this sub-thread is:
> >
> > "It's fine. No really it is. But anyway it depends on how Perl
> > implements open() and anyway might not work and anyway we can't refer
> > you to any documentation you've just got to trust us."
>
> OK here's the truth.
>
> If you are on a system that correctly implements flock() and you use
> the example appending code from "perldoc -f flock" everything will be
> OK even if the OS you are on doesn't implement append mode correctly.
> So if you are happy to restrict yourself to OSs that implement flock()
> (and that's not really much of a restriction) then that is what you
> should do.
>
> If you know you are only going to use a system that does correctly
> implement appending (i.e. not Win32) then you can omit the seek() from
> the above code.
>
> If you know are only writting code to run on an OS and filesystem that
> does implement append mode correctly (a local filesystem on a modern
> Unix for example), and you keep the file in block-buffered mode and
> you write less than one buffer-full of output between each manual
> flushing of the buffer then each bufferload is almost garanteed to be
> written to the end of the file in one chunk without getting
> intermingled with anyone else's output.
>
> There is still a small threoretical chance that a signal will
> interrupt the system level write() operation before completion. There
> is also a pssibility that some STDIO implementations may call multiple
> system level write()s even if the buffer was empty to start. There
> may be some systems where this probability is reduced to zero.
>
> I do not know how in Perl you can find the default size of the buffer,
> but IO::Handle does provide a way to change it.
>
> --
> \\ ( )
> . _\\__[oo
> .__/ \\ /\@
> . l___\\
> # ll l\\
> ###LL LL\\
--
-----------
Paul
http://www.seditiousdiaries.com/Donald10.html
------------------------------
Date: 28 Apr 2001 20:36:43 +0100
From: Paul the Nomad <taka@yarn.demon.co.uk>
Subject: Re: Appending to files and flock.
Message-Id: <87zod0akac.fsf@euterpe.yarn.demon.co.uk>
tadmc@augustmail.com (Tad McClellan) writes:
> Paul the Nomad <taka@yarn.demon.co.uk> wrote:
>
> >This thread is really appalling.
>
>
> I agree. And I know who to blame and have taken the appropriate action.
>
>
> >When I originally asked this, I was
> >referred rudely
>
>
> Since you do not quote what it is that you are referring to, we
> are forced to guess. I can't see any rudeness, but perhaps you
> see some rudeness in this reply:
>
> ----------------
> No, it's something about the open mode.
>
> Did you study perlopentut?
> ----------------
>
> Is that the rude reply that you are referring to?
>
> What is rude there? Looks fine to me.
>
>
> >Before telling people to RTFM, might it not be preferable to ensure
> >that the FM has the information requested?
>
>
> Before starting yet another "file locking on this and that OS"
> thread, might it not be preferable to ensure that the whole
> thing has not already been played out multiple times already?
>
>
> >If not, it would be better
> >to STFU.
>
>
> Golly, you insist on those last few scorepoints reserved for only
> the most vile. OK, you got them!
>
Generally, I've noticed on this group that someone asks something and
the reply is:
"perldoc -f aFunction"
Which is next to useless. I'm leaving.
>
> >So far the totally inadequate answer
>
>
> If Usenet does not get you the answer, then you need to look elsewhere.
>
> This isn't a help desk.
>
> We have no obligation to solve your problem.
>
> You ask and then you take your chances with whatever responses you get.
>
>
> --
> Tad McClellan SGML consulting
> tadmc@augustmail.com Perl programming
> Fort Worth, Texas
--
-----------
Paul
http://www.seditiousdiaries.com/Donald10.html
------------------------------
Date: Sat, 28 Apr 2001 21:13:41 +0200
From: eins@durchnull.de (Rudolf Polzer)
Subject: Re: Boole's tools (was Things I'm just not getting in Perl)
Message-Id: <slrn9em5j5.2to.eins@www42.t-offline.de>
Anno Siegel <anno4000@lublin.zrz.tu-berlin.de> wrote:
> Andrew Lee shows his savoir-faire by posting five times:
>
> > > Andrew Lee (andrew_lee@nospamearthlink.net) wrote on MMDCCXCVI September
> >
> > Maybe your problem stems from your misuse of Roman Numerals ... either that or I
> > posted the refered to article 795 years from now.
>
> Thanks for making a fool of yourself right from the start. That saves
> me the effort of reading the rest of your drivel. Abigail dates postings
> creatively but accurately.
>
> [rest snipped]
>
> Anno
>
> PS: Don't bother to adjust your line length. It doesn't matter much
> anymore.
BTW: There _are_ applications of the Perl semantics of ||. Most of
them, however, exist because Perl lacks 'switch', but there are really
good ones. Like sorting after multiple criteria, error checking etc.
Perhaps you want only 'or' to have this semantics and '||' to have the
C semantics?
--
#!/usr/bin/perl -W -- WARNING: This copies a random file from
use strict;my$s;my$n=0;for # the current directory to your
(<*>){++$n;int rand$n or$s # signature file. Use at your
=$_};`cp $s ~/.signature`; # own risk! (c) 2001 Rudolf Polzer
------------------------------
Date: Sat, 28 Apr 2001 23:40:25 +0200
From: "Lüder Sachse" <lueder@gmx.at>
Subject: Can't locate object method with @ISA
Message-Id: <3aeb38dd_2@news.arcor-ip.de>
Hi!
I want to use the methods of the class "Baseclass" within "Subclass". When I
try to do this, it shows me:
Can't locate object method "allocate" via package "Subclass" at testclass.pl
line 26.
Shouldn't it automatically call the allocate-Method from Baseclass because
I've set @ISA in Subclass to qw(Baseclass)?
What am I doing wrong?
Thanks in advance.
Lueder
Here is my code:
#!/usr/bin/perl
$testclass = Subclass->new("Hello", "World");
print $testclass->getValue();
package Baseclass;
sub allocate {
my ($pkg, $value) = @_;
my $base = bless {
"value" => $value
}, $pkg;
return $base;
}
sub change {
my ($obj, $newval) = @_;
$obj->{value} = $newval if $newval;
}
package Subclass;
@ISA = qw(Baseclass);
sub new {
my ($pkg, $pnt, $value) = @_;
# Next line gives the error message:
my $subclass = $pkg->allocate($value);
$subclass->{pointer} = $pnt;
return $subclass;
}
sub getPnt {
my ($obj) = @_;
return $obj->{pointer};
}
sub getValue {
my ($obj) = @_;
return $obj->{value};
}
------------------------------
Date: Sat, 28 Apr 2001 21:54:40 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: Can't locate object method with @ISA
Message-Id: <g1fmetgagt0tva653l0cvb4dmov974oe4u@4ax.com>
Lüder Sachse wrote:
>Shouldn't it automatically call the allocate-Method from Baseclass because
>I've set @ISA in Subclass to qw(Baseclass)?
>What am I doing wrong?
You have actually loaded Baseclass, I hope? "use base Baseclass;" ought
to work, too.
--
Bart.
------------------------------
Date: Sat, 28 Apr 2001 12:50:53 -0400
From: Andras Malatinszky <andras@mortgagestats.com>
Subject: Re: creating an array of all filenames
Message-Id: <3AEAF4ED.EFEF4BA9@mortgagestats.com>
Abigail wrote:
> Randal L. Schwartz (merlyn@stonehenge.com) wrote on MMDCCXCVII September
> MCMXCIII in <URL:news:m1itjpzxgv.fsf@halfdome.holdit.com>:
> )) >>>>> "Jon" == Jon Ericson <Jonathan.L.Ericson@jpl.nasa.gov> writes:
> ))
> )) Jon> Max Gravitt <magrav@wnt.sas.com> writes:
> )) >> I'm trying to create an array that contains all of the filenames in a
> )) >> directory tree (recursive). I'm almost there. The below function is
> )) >> called with the directory where to start looking.
> ))
> )) Jon> Any reason you're not using File::Find?
> ))
> )) Usually because it's homework. :)
>
> Heh, I was once given a similar question during a job interview.
> There was a white board and a marker to write down the program. ;-)
>
> Abigail
>
Did you get the job?
------------------------------
Date: Sat, 28 Apr 2001 18:12:28 +0000 (UTC)
From: abigail@foad.org (Abigail)
Subject: Re: creating an array of all filenames
Message-Id: <slrn9em20c.kd1.abigail@tsathoggua.rlyeh.net>
Andras Malatinszky (andras@mortgagestats.com) wrote on MMDCCXCVII
September MCMXCIII in <URL:news:3AEAF4ED.EFEF4BA9@mortgagestats.com>:
==
==
== Abigail wrote:
==
== > Randal L. Schwartz (merlyn@stonehenge.com) wrote on MMDCCXCVII September
== > MCMXCIII in <URL:news:m1itjpzxgv.fsf@halfdome.holdit.com>:
== > )) >>>>> "Jon" == Jon Ericson <Jonathan.L.Ericson@jpl.nasa.gov> writes:
== > ))
== > )) Jon> Max Gravitt <magrav@wnt.sas.com> writes:
== > )) >> I'm trying to create an array that contains all of the filenames in a
== > )) >> directory tree (recursive). I'm almost there. The below function is
== > )) >> called with the directory where to start looking.
== > ))
== > )) Jon> Any reason you're not using File::Find?
== > ))
== > )) Usually because it's homework. :)
== >
== > Heh, I was once given a similar question during a job interview.
== > There was a white board and a marker to write down the program. ;-)
==
== Did you get the job?
I would, if it wasn't for the US obnoxious immegration laws.
Abigail
--
$" = "/"; split $, => eval join "+" => 1 .. 7;
*{"@_"} = sub {foreach (sort keys %_) {print "$_ $_{$_} "}};
%{"@_"} = %_ = (Just => another => Perl => Hacker); &{%{%_}};
------------------------------
Date: 28 Apr 2001 17:03:08 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: dynamic creation of classes?
Message-Id: <9cet4c$3g5$1@mamenchi.zrz.TU-Berlin.DE>
According to <nobull@mail.com>:
> anno4000@lublin.zrz.tu-berlin.de (Anno Siegel) writes:
>
> > $class =~ s!::!/!g; $class .= '.pm';
> > require $class;
>
> I used to recommend this myself, but then I head of .pmc files.
What are those?
> eval "require $class";
>
> I hate eval() as nuch as the nest person but I don't see it's
> avoidable here.
Well, if you need string eval anyhow, you can go back to
eval "use $class";
and leave the transformation to the filename to Perl.
Anno
------------------------------
Date: Sat, 28 Apr 2001 21:48:13 +0200
From: eins@durchnull.de (Rudolf Polzer)
Subject: Re: dynamic creation of classes?
Message-Id: <slrn9em7js.8jf.eins@www42.t-offline.de>
Anno Siegel <anno4000@lublin.zrz.tu-berlin.de> wrote:
> According to <nobull@mail.com>:
> > anno4000@lublin.zrz.tu-berlin.de (Anno Siegel) writes:
> >
> > > $class =~ s!::!/!g; $class .= '.pm';
> > > require $class;
> >
> > I used to recommend this myself, but then I head of .pmc files.
>
> What are those?
>
> > eval "require $class";
> >
> > I hate eval() as nuch as the nest person but I don't see it's
> > avoidable here.
>
> Well, if you need string eval anyhow, you can go back to
>
> eval "use $class";
>
> and leave the transformation to the filename to Perl.
>
> Anno
Perhaps there is a real use of this:
my $CLASS = eval ('use DB_File;') ? 'DB_File' :
eval ('use SDBM_File;') ? 'SDBM_File' :
die 'No DB module';
and then use the $CLASS in the tie() call. When not using all features
(restricting to the common subset), this autodetects which database
module to use. ActivePerl and some webspace providers do not contain
DB_File, and since it is written in C, it cannot be compiled when one
does not have telnet access. This is untested, but something like this
should work. I did not try, however, to do this directly in the tie()
because I wanted the variable for debugging purposes, but it should
work even then (but maybe only once - what does use return, when the
module is in %INC? No answers on this, I know where to look).
--
#!/usr/bin/perl -W -- WARNING: This copies a random file from
use strict;my$s;my$n=0;for # the current directory to your
(<*>){++$n;int rand$n or$s # signature file. Use at your
=$_};`cp $s ~/.signature`; # own risk! (c) 2001 Rudolf Polzer
------------------------------
Date: 28 Apr 2001 21:34:50 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: dynamic creation of classes?
Message-Id: <9cfd1q$fl2$1@mamenchi.zrz.TU-Berlin.DE>
According to Rudolf Polzer <eins@durchnull.de>:
[...]
> Perhaps there is a real use of this:
>
> my $CLASS = eval ('use DB_File;') ? 'DB_File' :
> eval ('use SDBM_File;') ? 'SDBM_File' :
> die 'No DB module';
Well, that's about how AnyDBM_File (which, btw. could use a renovation)
does it.
Anno
------------------------------
Date: Sat, 28 Apr 2001 21:53:07 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: dynamic creation of classes?
Message-Id: <uuemets3g2f8ojngopeb6err0qlfum0h8t@4ax.com>
Rudolf Polzer wrote:
>Perhaps there is a real use of this:
>
>my $CLASS = eval ('use DB_File;') ? 'DB_File' :
> eval ('use SDBM_File;') ? 'SDBM_File' :
> die 'No DB module';
Are you sure this is correct and complete?
print eval 'use strict';
-->
Nothing is printed, so this returns false.
--
Bart.
------------------------------
Date: 28 Apr 2001 08:16:13 -0500
From: Ren Maddox <ren@tivoli.com>
Subject: Re: First and last element in list loop
Message-Id: <m3y9slf9lu.fsf@dhcp9-172.support.tivoli.com>
On Sat, 28 Apr 2001, bart.lateur@skynet.be wrote:
> I think I'd remove $list[0] and $list[-1] from the list, using shift
> and pop respectively, and simply write different code for them.
>
> my @animals = qw( birds cats dogs);
> my $first = shift @animals ;
> my $last = pop @animals ;
> my $sentence = "There are $first";
> foreach (@animals) {
> $sentence .= ", $_";
> }
> $sentece .= "and $last.";
Or:
my @animals = qw/ birds cats dogs /;
my $sentence = "There are " . join(", ", @animals[0..$#animals-1]) .
" and $animals[-1].";
Or:
my @animals = qw/ birds cats dogs /;
my $sentence = do {
local $" = ", ";
"There are @animals[0..$#animals-1] and $animals[-1].";
};
--
Ren Maddox
ren@tivoli.com
------------------------------
Date: Sat, 28 Apr 2001 15:43:13 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: First and last element in list loop
Message-Id: <x78zklghcw.fsf@home.sysarch.com>
>>>>> "GJ" == Gwyn Judd <tjla@guvfybir.qlaqaf.bet> writes:
GJ> "mein Luftkissenfahrzeug ist voll von den Aalen"
GJ> said Uri Guttman (uri@sysarch.com) in
GJ> <x7bsphh48f.fsf@home.sysarch.com>:
>>>>>>> "GJ" == Gwyn Judd <tjla@guvfybir.qlaqaf.bet> writes:
GJ> I dunno though, wouldn't this break programs that do stuff like:
>>
GJ> print "The index of the last item is $#array\n";
>>
>> he means plain $# as the perl special variable that would track the
>> index of a foreach loop. it has been bandied about in both p5p and perl6
>> lists.
GJ> I know what he means. I was just pointing out that that particular
GJ> variable name might cause problems with existing code (that uses the
GJ> $#array variable as the index of the last item in an array).
explain how that would/could cause problems.
uri
--
Uri Guttman --------- uri@sysarch.com ---------- http://www.sysarch.com
SYStems ARCHitecture and Stem Development ------ http://www.stemsystems.com
Learn Advanced Object Oriented Perl from Damian Conway - Boston, July 10-11
Class and Registration info: http://www.sysarch.com/perl/OOP_class.html
------------------------------
Date: Sat, 28 Apr 2001 15:47:49 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: First and last element in list loop
Message-Id: <x766fpgh57.fsf@home.sysarch.com>
first, stop jeopardy posting. i (nor any of the others) can't follow
this thread with your backwards posts.
>>>>> "GT" == Gregory Toomey <gtoomey@usa.net> writes:
GT> "Uri Guttman" <uri@sysarch.com> wrote in message
>>
>> @a = ( 1 ) x 4 ;
>>
>> foreach $a ( @a ) {
>>
>> print \$a, " $a\n" ;
>>
>> print "first $a\n" if \$a == \$a[0] ;
>> print "last $a\n" if \$a == \$a[$#a] ;
>> }
GT> Uri, this is a little closer still.
GT> for (@a=((1) x 4)) {
GT> print \$_, " $_\n" ;
GT> print "first $_\n" if \$_ == \$a[0] ;
GT> print "last $_\n" if \$_ == \$a[$#a] ;
GT> }
and other than rolling in the assignment into the for list, what change
did that do?
uri
--
Uri Guttman --------- uri@sysarch.com ---------- http://www.sysarch.com
SYStems ARCHitecture and Stem Development ------ http://www.stemsystems.com
Learn Advanced Object Oriented Perl from Damian Conway - Boston, July 10-11
Class and Registration info: http://www.sysarch.com/perl/OOP_class.html
------------------------------
Date: 28 Apr 2001 17:21:28 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: First and last element in list loop
Message-Id: <9ceu6o$3g5$2@mamenchi.zrz.TU-Berlin.DE>
According to Gregory Toomey <gtoomey@usa.net>:
Please don't top-post.
> Yes, but you haven't defined first() and last().
No, and if I did, last() wouldn't work (it's a keyword).
What for? My (pseudo-) code demonstrates what first() and last()
could be used for, not how to implement them.
[jeopardectomy]
Anno
------------------------------
Date: Sat, 28 Apr 2001 16:53:16 +0200
From: "Michael Ströck" <michael@stroeck.com>
Subject: Re: Good editor for perl
Message-Id: <3aead943$1@e-post.inode.at>
Well, sometimes that isn't true.
This editor is indeed very good.
"Steve Lamb" <grey@despair.rpglink.com> schrieb im Newsbeitrag
news:slrn9ebomo.n0n.grey@teleute.dmiyu.org...
> On Tue, 24 Apr 2001 20:21:03 GMT, Mark <moverho1@nycap.rr.com> wrote:
> >just found this one havent used it much but its free may already be
submited
> >here though
> >http://www.mkidesign.com/software.html
> >this is alot like the multiedit software and looks to be customisable.
> >it is freeware
>
> Sorry, any web page for a program which should have screen shots and
does
> not isn't worth the time to look at. While screenshots may not tell you a
lot
> about a program they do say a lot about it.
>
> --
> Steve C. Lamb | I'm your priest, I'm your shrink, I'm
your
> ICQ: 5107343 | main connection to the switchboard of
souls.
> -------------------------------+------------------------------------------
---
------------------------------
Date: Sat, 28 Apr 2001 18:00:30 +0100
From: "Ciaran McCreesh" <keesh@users.pleaseremovethisbit.sourceforge.net>
Subject: Re: Good editor for perl
Message-Id: <9cessd$4e5$1@news6.svr.pol.co.uk>
In article <9c1csm$loh$1@news1.xs4all.nl>, "Super-Simon"
<simon@super-simon.com> wrote:
> I'm searching for a good, fast editor with syntax highlighting for perl
> (CGI) for use under Windows 2000 / Windows 98 (I use windowz only for
> editing scripts, scripts runs on Linux-server). It has to be free (I'm a
> poor student ;-)
Personally, I use http://www.chami.com/html-kit/ when I'm forced to
revert to WinDoze. Vim is nice enough (I use it on Linux), but the Perl
plugins for HTML-Kit provide a nice touch.
Yes, it's free, but no source :(
Ciaran
--
Ciaran McCreesh
mail: keesh@users.sourceforge.net
web: http://www.opensourcepan.com/
------------------------------
Date: Sat, 28 Apr 2001 15:02:19 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: help me
Message-Id: <Pine.LNX.4.30.0104281458110.15730-100000@lxplus003.cern.ch>
On Sat, 28 Apr 2001, RS wrote:
> This won't help me
Then re-think your problem statement. This isn't a Perl language
issue.
> I want to know monitor resolution of my guests (like 800x600 and 1024x768)
Nosey parker. Then stop wanting that. NOYDB.
You could of course consider reading a few of the thousands of threads
this issue has raised over the years on WWW-related groups.
[f'ups prophylactically set. scorefile adjusted]
------------------------------
Date: Sat, 28 Apr 2001 11:16:16 -0400
From: Andras Malatinszky <andras@mortgagestats.com>
Subject: Re: help me
Message-Id: <3AEADEBF.62880D26@mortgagestats.com>
RS wrote:
> HI
>
> I 'm writing counter for my site and I would like to log my guests display
> settings (resolution).
>
> Is this possible???
>
> I have Apache -> UNIX
>
> stuffweb@hot.ee
See if you can do this in Javascript. Once your Javascript code has read the
resolution, it can trivially transmit the results to your server via CGI. Perl
won't help you here.
------------------------------
Date: Sat, 28 Apr 2001 12:30:17 -0400
From: brian d foy <comdog@panix.com>
Subject: Re: help me
Message-Id: <comdog-6E07EB.12301728042001@news.panix.com>
In article <slrn9el1r4.sh.tjla@thislove.dyndns.org>,
tjla@guvfybir.qlaqaf.bet (Gwyn Judd) wrote:
> "mein Luftkissenfahrzeug ist voll von den Aalen"
> said Bob Walton (bwalton@rochester.rr.com) in
> <3AEA157A.1C65BD86@rochester.rr.com>:
> >RS wrote:
> >> I 'm writing counter for my site and I would like to log my guests display
> >> settings (resolution).
>
> >perldoc -q increment the counter
>
> I think that the question you answered is not the same question as the
> question that was asked. I don't think you can do this in Perl anyway.
it's not a matter of Perl being able to do it. no language can do
it - at least until Damian comes out with WWW::Superpositions.
--
brian d foy <comdog@panix.com>
CGI Meta FAQ - http://www.perl.org/CGI_MetaFAQ.html
Troubleshooting CGI scripts - http://www.perl.org/troubleshooting_CGI.html
------------------------------
Date: Sat, 28 Apr 2001 19:24:10 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: help me
Message-Id: <Pine.LNX.4.30.0104281838160.30832-100000@lxplus003.cern.ch>
On Sat, 28 Apr 2001, Gregory Toomey jeoparditically declaimed:
> You can't do this using Perl/cgi as it isn't supported bu the HTTP protocol.
Well, there's a grain of truth in that answer... but there are quite
a number of things that _are_ "supported" by the HTTP protocol but are
documented to be unreliable (and easily faked), such as user agent,
refer(r)er etc.
> I always assume 720 pixels horizontally
How bizarre! I always assume I don't know, and design on the basis
that I don't need to know.
I suppose someone should register a routine protest at the totally
inept subject line of this thread. Wasn't there an FAQ by one of the
Perl stalwarts about choosing a meaningful subject line? Not that
there's really anything Perl-specific about the issue...
Gosh, Google's first suggestion in response to my search was
http://www.fi.muni.cz/~adelton/cz_subject_lines.html - woops!
I've nothing against cz, I just don't happen to read it.
And Altavista came up with "choosing the perfect dog" - - woofs!
OK, by a somewhat indirect hunt I tracked it down at CPAN
http://www.cpan.org/authors/Dean_Roehrich/subjects.post
Why _is_ that so hard to track down if you don't already know where to
look? It surely deserves much wider publicity!
ttfn
------------------------------
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 790
**************************************