[8998] in Perl-Users-Digest
Perl-Users Digest, Issue: 2616 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat May 16 01:08:27 1998
Date: Fri, 15 May 98 22:00:28 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Fri, 15 May 1998 Volume: 8 Number: 2616
Today's topics:
date... <Philipp999@gmx.net>
DB_File in Solaris <eg_ckc@uxmail.ust.hk>
Re: DB_File in Solaris (Michael Fuhr)
Re: Does Perl have a IDE?I don't like command line. <ljz@asfast.com>
Re: Does Perl have a IDE?I don't like command line. (Rich Morin)
Re: Does Perl have a IDE?I don't like command line. <ljz@asfast.com>
Re: Does Perl have a IDE?I don't like command line. (Abigail)
Re: Does Perl have a IDE?I don't like command line. <ljz@asfast.com>
Re: Does Perl have a IDE?I don't like command line. (Leslie Mikesell)
Duplicates output data on last field <webmaster@fccjmail.fccj.org>
Re: Duplicates output data on last field <lr@hpl.hp.com>
Re: Duplicates output data on last field <webmaster@fccjmail.fccj.org>
Re: help with quoting patterns, please (Tad McClellan)
how do I hide or noecho terminal input <lylem@plinet.com>
Re: how do I hide or noecho terminal input <tchrist@mox.perl.com>
Re: How to determine a perl-reserved word (string) (Ilya Zakharevich)
Re: net::ftp perlwin32 cwd? <sowmaster@juicepigs.com>
Re: Non-standard use of "standard" (Ilya Zakharevich)
Re: perl text editor for windows95 (Shaun Sides)
Re: Timeout a program in Perl <tchrist@mox.perl.com>
vec basics (Barry Masterson)
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 15 May 1998 13:20:32 +0100
From: Philipp <Philipp999@gmx.net>
Subject: date...
Message-Id: <355C3310.863CD347@gmx.net>
Hi all!
Does anybody know how to easily get the date from a day that is a week
ago?
Thanks
phil
------------------------------
Date: 15 May 1998 18:18:50 GMT
From: George Chung <eg_ckc@uxmail.ust.hk>
Subject: DB_File in Solaris
Message-Id: <6ji0ua$p6v@ustsu10.ust.hk>
I can use DB_File in my linux box but i cannot in Solaris 2.5.1. I have
tried my best to build it but failed.
Anyone could guide me how to compile perl with DB_File support in Solaris ?
Thanks.
George
--
Chung Kwong Chuen, George, [big5] Ai%z,u, [gb] VS9bH* .
E-mail: eg_ckc@uxmail.ust.hk Homepage: If I can squeeze a little time....
Department: Electrical and Electronic Engineering,
Computer Engineering Programme. Final-year student -p:b>w$u5{$T&~/E
The Hong Kong University of Science and Technology. -;4d,l'^$j>G.
------------------------------
Date: Sat, 16 May 1998 02:09:38 GMT
From: mfuhr@dimensional.com (Michael Fuhr)
Subject: Re: DB_File in Solaris
Message-Id: <6jish0$fvj@flatland.dimensional.com>
George Chung <eg_ckc@uxmail.ust.hk> writes:
> I can use DB_File in my linux box but i cannot in Solaris 2.5.1. I have
> tried my best to build it but failed.
>
> Anyone could guide me how to compile perl with DB_File support in Solaris ?
You're probably missing the Berkeley DB library:
http://www.sleepycat.com/db/
ftp://ftp.sleepycat.com/pub/
--
Michael Fuhr
http://www.dimensional.com/~mfuhr/
------------------------------
Date: 15 May 1998 21:42:32 -0400
From: Lloyd Zusman <ljz@asfast.com>
Subject: Re: Does Perl have a IDE?I don't like command line.
Message-Id: <ltlns30z5j.fsf@asfast.com>
abigail@fnx.com (Abigail) writes:
> Greg Bacon (gbacon@cs.uah.edu) wrote on MDCCXVIII September MCMXCIII in
> <URL: news:6ji6b8$kru$1@info.uah.edu>:
> ++ In article <6jht3q$nn$1@ultranet.com>,
> ++ fsg@ultranet.com writes:
> ++
> ++ : The IDE also makes
> ++ : the annoying and tedious part of writing win32 programs (designing the
> ++ : interface) trivial, which is good, because I've got better things to worry
> ++ : about than implementing a button.
> ++
> ++ What of Tk? Tk code will run on many, many, many more platforms than
> ++ the hoarde fodder will.
>
> Perhaps.
>
> But that's not what is most important. Development time is important
> too. Our company produces software, and part of the software is a GUI
> interface. To run and build the GUI aspect, we use a commercial set of
> libraries, and an development environment. That enables the programmer to
> create and change the screens with buttons, menus, lists and scrollbars
> without wasting too much time. It easily enforces consistent styles over
> the hundreds of different screens. The editor spits out a ".rc" file,
> from which C files (source + headers) are generated by make. You do the
> job once, and it compiles on Unices and NT without porting problems.
Some people might argue that the GUI aspect is a waste of time, or
that commercial software is evil. However, the world runs on software
these days, and whether we like it or not, people will be building it,
selling it, and using it. Anything which makes one or more of these
things cheaper, simpler, easier to create correctly, or more efficient
is going to help society as a whole.
IDE's are one of the tools which make it cheaper and easier to produce
usable software. GUI's help the millions of people who *use* this
software on a day-to-day basis to utilize it more efficiently. I
therefore see nothing wrong with either of these.
> Does that hide the programmer from what exactly is going on? Yes, it
> certainly does. Is that bad? Nope, not in my opinion. It's a frigging
> button. There's no point in wasting time to build a button; let the
> programmer spend time on programming the call back function, that's
> what counts.
I totally agree. The fun, interesting, and most of all, *useful* work
is usually done in the callbacks, not in the application framework or
the IO routines.
I've already proven to myself several hundred times over that I can
write interrupt service routines, event loops, IO drivers,
etc. etc. etc. If I need to write another one of these, I will, but
why go out of my way to do this any more? Certainly not for the sake
of my ego.
And by the way ... I still haven't seen a clear answer as to what
criteria are used to label modules in CPAN (including CPAN.pm itself)
as "good" and IDE's and wizards as "evil".
And one more thing: Abigail, I have to admit that it feels really
good to be in general agreement with you about something. I mean this
sincerely.
--
Lloyd Zusman ljz@asfast.com
perl -e '$n=170;for($d=2;($d*$d)<=$n;$d+=(1+($d%2))){for($t=0;($n%$d)==0;
$t++){$n=int($n/$d);}while($t-->0){push(@r,$d);}}if($n>1){push(@r,$n);}
$x=0;map{$x+=(($_>0)?(1<<log($_-0.5)/log(2.0)+1):1)}@r;print"$x\n"'
------------------------------
Date: Fri, 15 May 1998 19:28:47 -0700
From: rdm@cfcl.com (Rich Morin)
Subject: Re: Does Perl have a IDE?I don't like command line.
Message-Id: <rdm-1505981928470001@140.174.42.30>
In article <6jhhmq$bd2$1@csnews.cs.colorado.edu>, tchrist@mox.perl.com
(Tom Christiansen) wrote:
> --tom, still wondering how to pass arguments to a mouse click
Well, MacPerl allows Perl scripts to be saved as "droplets". A user can
then "drag and drop" one or more files and/or folders to the droplet's
icon and have it iterate over them. If options are needed, the script
can open up a dialog box (typically with defaults).
-r
--
Canta Forda Computer Laboratory | Prime Time Freeware - quality
UNIX consulting, training, & writing | freeware at affordable prices
+1 415-873-7841 | +1 408-433-9662 -0727 (Fax)
Rich Morin, rdm@cfcl.com | www.ptf.com, info@ptf.com
------------------------------
Date: 15 May 1998 22:35:40 -0400
From: Lloyd Zusman <ljz@asfast.com>
Subject: Re: Does Perl have a IDE?I don't like command line.
Message-Id: <ltiun70woz.fsf@asfast.com>
Tom Christiansen <tchrist@mox.perl.com> writes:
> In comp.lang.perl.misc, fsg@ultranet.com writes:
> :This is a USENET problem, not a Perl problem, and it won't cause the
> :downfall of Perl.
>
> That wasn't the point. The point was that this kind of thing has made
> this newsgroup virtually useless, practically destroying through a
> forever-September combination of ignorance and selfishness a resource
> that had been historically valuable to the Perl community. Now combine
> this with the effective disregard -- and sometimes even scorn -- for
> the man-decades of work we've all spent documenting Perl. [ ... ]
I think that this scorn you are referring to occurs very infrequently.
I believe that the vast majority of people who have more than a
passing familiarity with Perl are *very* appreciative of the work that
has gone into the language, the documentation, the module library,
etc. Furthermore, I also believe that most of the people who
appreciate these things are also benefitting greatly from them and
are gratefully aware of this fact.
I know that it can hurt to see the fruits of ones selfless devotion to
a hugely beneficial task being ignorantly scorned. But just keep in
mind that those who complain are a very small percentage of people who
read and contribute to this newsgroup. Their complaints don't change
the usefulness and the excellence of what has been created, nor the
appreciation that is afforded to all of you creators by the majority
of us here.
> [ ... ] Why should we care to be part of that world? Why should Perl?
I'm sure you know that no one can answer your first question but each
of you individually. But I will freely offer this personal opinion
(and so therefore, you know what it's worth <g>):
Don't take this so personally. All you're doing is making yourself
upset over something you can't control and over something which has
very little bearing on those things which are really important (such
as Perl itself!). There will always be people in the world who don't
approve of someone else's work ... including your own. If people were
to base their decisions about being in the world primarily on the
opinions of their detractors, then very few of us would be here at
all.
Just remember all the people who *do* benefit from and greatly
appreciate the work you have done. And I would even suggest that you
go one step further: just remember that you *know* how wonderful Perl
is and how much selfless labor has gone into it. Even if everyone
else who ever realized this were somehow to suddenly disappear off the
face of the earth, *YOU* know this, and this knowledge can be the
source of much personal satisfaction.
If you focus on people's approval or disapproval, you are setting
yourself up for some unneeded misery. If, on the other hand, you
focus on the fact that you are someone who has actually contributed
something to the world that is wonderful and that clearly has made it
a much better place for many, many people, then perhaps you will feel
better.
My selfish wish is that you don't retreat from this world or stop
contributing just because you are encountering some of the people who
inevitably will not approve of your work. I think that this would be
a huge waste of talent. And I don't believe that this course of
action make you the slightest bit happy, satisfied, or fulfilled.
As for your second question ("Why should Perl?"):
The answer to this one is easy: because Perl has made the world a
better place. Countless millions of person-hours have been saved
through the use of Perl. Millions of bursts of joyful glee have
lovingly bubbled out of the hearts of countless Perl programmers as
they have delighted in discovering yet another really *COOL* language
feature that only a true hacker/geek/wizard can appreciate in the
depths of his or her soul.
If you're getting burned out or need a rest, then be all means, do
what you need to do for yourself. If that means leaving this world
for a while, or perhaps just hanging out in a place like
clp.moderated, then go for it. Most people here will support you and
silently (or not-so-silently) pray for your return.
But whatever you do, don't take Perl with you!
> --tom
> --
> "A pithy saying is worth its weight in gold." --Larry Wall
Oh, don't be tho pithy about thith!
--
Lloyd Zusman ljz@asfast.com
perl -e '$n=170;for($d=2;($d*$d)<=$n;$d+=(1+($d%2))){for($t=0;($n%$d)==0;
$t++){$n=int($n/$d);}while($t-->0){push(@r,$d);}}if($n>1){push(@r,$n);}
$x=0;map{$x+=(($_>0)?(1<<log($_-0.5)/log(2.0)+1):1)}@r;print"$x\n"'
------------------------------
Date: 16 May 1998 02:46:37 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Does Perl have a IDE?I don't like command line.
Message-Id: <6jiumd$rif$1@client3.news.psi.net>
Stuart McDow (smcdow@arlut.utexas.edu) wrote on MDCCXVIII September
MCMXCIII in <URL: news:6jiceb$d1n$1@ns1.arlut.utexas.edu>:
++ abigail@fnx.com (Abigail) writes:
++ >
++ > Well, one of the largest Unix vendors (if not the largest) Sun
++ > doesn't deliver a compiler with its OS either. If you want one, you
++ > have to pay.
++
++ Strawman.
++
++ $ uname -a ; gcc -v
++ SunOS sgggsd16.arlut.utexas.edu 5.6 Generic_105182-03 i86pc i386 i86pc
++ Reading specs from /opt/depot/gcc/lib/gcc-lib/i386-pc-solaris2.6/2.8.1/specs
++ gcc version 2.8.1
++
++ Do you pay for gcc?
gcc is hardly native to SunOS, is it? Besides, how do you build gcc
without a compiler?
++ > ++ Microsoft's new, more truthful ad slogan should be: "How can you make
++ > ++ money for us today?"
++ >
++ > And Sun, SGI, HP, Oracle, Sybase, Neuron Data, etc give their products
++ > away for free? Making money from OSses and other software products isn't
++ > limited to MicroSoft.
++
++ Agreed. I have no problem with that. OSes are OSes. What I do have a
++ problem with is selling OSes that make it impossible to do development
++ on without buying their IDEs and/or SDKs. At least Sun, SGI, HP, et al
++ ship with include files and libraries. You can build gcc on them and
++ go to town.
Really? A recent thread on p5p claimed that IRIX doesn't come with
include files.
++ I haven't seen a native gcc port to NT that I like yet (I hope that
++ I'm underinformed and someone proves me wrong). That's 'cause NT
++ doesn't ship with any sort of system definition (include files,
++ libraries. etc). You have to spend a couple hundred dollars and buy a
++ damn SDK for that. The include files and libraries are part of the
++ *SDK*, not the *OS*, a situation which I find ludicrous. It's a
++ situation in which the closest thing to a "native" compiler for NT is
++ the MS SDKs ('cause they wrote the OS, and they presumably know how it
++ was built). So, you get to pay MS twice - once for the OS and once for
++ the SDK. (Even if you don't buy the SDK from MS, you still pay
++ twice). It's the having to pay for the SDK - 'cause there's *no* other
++ way to develop software on that platform - that pisses me off.
Perhaps you have to pay twice, but you should look at the total cost.
How much does NT + SDKs costs compared say Solaris + compiler.
Abigail
--
perl -MTime::JulianDay -lwe'@r=reverse(M=>(0)x99=>CM=>(0)x399=>D=>(0)x99=>CD=>(
0)x299=>C=>(0)x9=>XC=>(0)x39=>L=>(0)x9=>XL=>(0)x29=>X=>IX=>0=>0=>0=>V=>IV=>0=>0
=>I=>$r=-2449231+gm_julian_day+time);do{until($r<$#r){$_.=$r[$#r];$r-=$#r}for(;
!$r[--$#r];){}}while$r;$,="\x20";print+$_=>September=>MCMXCIII=>()'
------------------------------
Date: 15 May 1998 23:58:51 -0400
From: Lloyd Zusman <ljz@asfast.com>
Subject: Re: Does Perl have a IDE?I don't like command line.
Message-Id: <ltg1ia27es.fsf@asfast.com>
abigail@fnx.com (Abigail) writes:
> Stuart McDow (smcdow@arlut.utexas.edu) wrote on MDCCXVIII September
> MCMXCIII in <URL: news:6jiceb$d1n$1@ns1.arlut.utexas.edu>:
> ++ abigail@fnx.com (Abigail) writes:
> ++ >
> ++ > [ ... ]
> ++
> ++ $ uname -a ; gcc -v
> ++ SunOS sgggsd16.arlut.utexas.edu 5.6 Generic_105182-03 i86pc i386 i86pc
> ++ Reading specs from /opt/depot/gcc/lib/gcc-lib/i386-pc-solaris2.6/2.8.1/specs
> ++ gcc version 2.8.1
> ++
> ++ Do you pay for gcc?
>
> gcc is hardly native to SunOS, is it? Besides, how do you build gcc
> without a compiler?
There's a site at Sun (I have to ask someone at work on Monday about
the URL) where you can download all sorts of freeware for Solaris that
can be installed via `pkgadd' or equivalent. Much of it is Gnu stuff,
including a pre-compiled `gcc' with all the libraries, include files,
etc.
But I still agree with your main point: Sun-based systems are
generally more expensive than those built on an Intel platform.
> ++ [ ... ]
> ++
> ++ Agreed. I have no problem with that. OSes are OSes. What I do have a
> ++ problem with is selling OSes that make it impossible to do development
> ++ on without buying their IDEs and/or SDKs. At least Sun, SGI, HP, et al
> ++ ship with include files and libraries. You can build gcc on them and
> ++ go to town.
>
> Really? A recent thread on p5p claimed that IRIX doesn't come with
> include files.
>
> ++ I haven't seen a native gcc port to NT that I like yet (I hope that
> ++ I'm underinformed and someone proves me wrong). That's 'cause NT
> ++ doesn't ship with any sort of system definition (include files,
> ++ libraries. etc). [ ... ]
The "Gnu-Win32" stuff put out by Cygnus is free and seems to be pretty
good. Its `gcc' works just fine for me, and it comes with include
files, libraries, etc.
> ++ [ ... ] You have to spend a couple hundred dollars and buy a
> ++ damn SDK for that. The include files and libraries are part of the
> ++ *SDK*, not the *OS*, a situation which I find ludicrous. It's a
> ++ situation in which the closest thing to a "native" compiler for NT is
> ++ the MS SDKs ('cause they wrote the OS, and they presumably know how it
> ++ was built).
Not true. The URL for the Cygnus stuff is http://www.cygnus.com.
> ++ [ ... ] So, you get to pay MS twice - once for the OS and once for
> ++ the SDK. (Even if you don't buy the SDK from MS, you still pay
> ++ twice). It's the having to pay for the SDK - 'cause there's *no* other
> ++ way to develop software on that platform - that pisses me off.
>
> Perhaps you have to pay twice, but you should look at the total cost.
> How much does NT + SDKs costs compared say Solaris + compiler.
Cost-wise, you're still way ahead with NT, unfortunately. That's why
so many corporations are swtiching from Unix on the desktop to NT.
Unix boxes from Sun et al are starting to come down in price, but NT
still has a lot of momentum right now in the corporate desktop world,
and overall, an Intel/Microsoft solution is still cheaper overall.
The big-name Unix-box vendors are going to have to cut prices even
more if they want to effectively compete over the next few years.
Linux, FreeBSD, and other Unices that run on Intel boxes are looking a
bit better these days in the corporate world (cost-wise), but most
corporations I'm familiar with seem to be leery of going with a
platform for which they can't purchase a 24x7 support contract from a
vendor they think will still be around in a few years.
And the integrated email/web/spreadsheet/database/word-processing
software that Microsoft sells is very attractive (cost-wise, as well)
in a corporate environment, and there's nothing that runs under Unix
that comes close in terms of price, interoperability, or support.
So far in my experience, the Microsoft boxes don't quite compete with
Unix platforms in terms of hard-core applications where speed and OS
reliability are issues. But NT is closing the gap here as time goes
on. Ironically, Java seems to be one of the things which is helping
this trend, because it can run just as well, if not better, under
Microsoft boxes as under Unices. And I'm talking Sun's JDK here, not
just Microsoft's J++ perversion. This is making it increasingly less
desirable to switch away from NT for serious applications, since the
Windows boxes are still generally cheaper these days.
If we really want to kick Bill's ass, we will have to do more than
carp about GUI's and insult Windows users. One way to do this would
be to offer an "integrated desktop solution" that runs under an
inexpensive, Intel-based, supportable Unix which is as cheap, robust,
easy to use, and interoperable as IE4.0/Office-97. Like it or not,
this means some major GUI-based development.
And as one part of this effort, more GUI and IDE stuff in Perl might
very well be necessary.
--
Lloyd Zusman ljz@asfast.com
perl -e '$n=170;for($d=2;($d*$d)<=$n;$d+=(1+($d%2))){for($t=0;($n%$d)==0;
$t++){$n=int($n/$d);}while($t-->0){push(@r,$d);}}if($n>1){push(@r,$n);}
$x=0;map{$x+=(($_>0)?(1<<log($_-0.5)/log(2.0)+1):1)}@r;print"$x\n"'
------------------------------
Date: 15 May 1998 23:11:42 -0500
From: les@MCS.COM (Leslie Mikesell)
Subject: Re: Does Perl have a IDE?I don't like command line.
Message-Id: <6jj3lu$m0b$1@Jupiter.Mcs.Net>
In article <6jicjn$3k9$1@info.uah.edu>, Greg Bacon <gbacon@cs.uah.edu> wrote:
>In article <6ji0f0$edo$1@mars.mcs.net>,
> les@MCS.COM (Leslie Mikesell) writes:
>: Maybe my memory is just getting fuzzy but I seem to recall a time
>: when Larry did answer questions on the net and I don't remember
>: him ever complaining about the questions being dumb. And since
>: there were no other perl experts at the time, the questions were
>: mostly pretty dumb.
>
>Well, there's the fact that the ratio of the sizes of the docset then and
>now is nearly zero. Larry was also faced with the daunting task of
>showing people how cool Perl is. He's admitted that he was playing PR
>games.
With a small docset there was less excuse for not understanding it
but I don't recall hostility toward those who didn't.
>: Also, I don't ever remember him insulting
>: people who asked questions that really were operating system or
>: environment issues. After all, if a perl program ran without using
>: OS functions, how would anybody know if it worked or not?
>
>Comparing Larry's hyping Perl to the world then and clpm of today is
>fallacious. clpm suffers from a huge topicality problem. If we didn't
>try to weed out the off-topic posts (i.e., not Perl-specific), this
>newsgroup would be much worse off than it is now.
Perl was and is used to accomplish specific real-world jobs. In that
context the important issues are often not language-specific but
require specific code in the language to solve. Outside of that context,
programming is meaningless. We already had Pascal for that...
Besides, the way to "weed out" posts is to just ignore the ones
that you don't want to answer, not to attack the poster. Things
are so bad here that I don't even feel bad about the hypocrisy in
saying that.
>: Am I just being nostalgic here or are there some news archives that
>: go back that far?
>
>The situation was very different then. It's invalid to compare it to
>the current state of affairs.
Yes, the ratio of perl experts used to be 1/(rest_of_universe). Now
there are lots of people who could answer the dumb questions if
they felt like it, or could ignore them if they don't. But instead
it is as bad as asking about kermit (remember the klunky but
interesting communication program that used to run on just about
everything). The answer always seems to be 'buy the book' instead
of 'try this neat new approach that I just thought of today'.
Les Mikesell
les@mcs.com
------------------------------
Date: Sat, 16 May 1998 00:11:34 GMT
From: Bill 'Sneex' Jones <webmaster@fccjmail.fccj.org>
Subject: Duplicates output data on last field
Message-Id: <355CD7DD.95A54D7C@fccjmail.fccj.org>
I have wrote a program for the FTP archive at ShadowMac and have
discovered a bug in logic. I am pretty sure the code fragment below
is where the bug is, but maybe I am missing it. Another set or two
of eyes would be most appreciated :-)
while(<inpFile>) {
$z++; # Increment the loop cntr...
chomp;
next if (/Header--$/); # One the Start Tag...
last if (/^--End/); # On the End Tag...
if (/\.hqx$/) {
$outLine .= $_ . "\t"; # Get the filename TWICE :-)
}
($z == 51) ? $outLine .= $_ # No Tabs on Last Element...
: $outLine .= $_ . "\t"; # Admin1 wants TABS as delimiter...
}
Yes, I am setting up all variables, using -w and strict. The program,
which in entirity is 668 lines, reads the entire ftp filebase and
opens every .HQX file it finds and reads the first 52 lines of data.
Somehow the output files (00index.tab, ####index.tab, etc) have
the last field of data copied out twice.
Am I missing it, or is the problem above and I am still missing it???
Thx :-)
-Sneex-
____________________________________________________________________________
Bill Jones | FCCJ Webmaster | Voice 1-904-632-3089 | Fax 1-904-632-3007
Florida Community College at Jacksonville | 501 W. State St. | Jax, FL 32202
mailto:webmaster@fccjmail.fccj.org | http://webmaster.fccj.org/Webmaster
PS - ShadowMac is a non-profit org which archives Mac software for
K-12 schools, etc... I wrote a few complete scripts for them, free :-)
You can see them at http://www.shadowmac.org
------------------------------
Date: Fri, 15 May 1998 17:54:45 -0700
From: "Larry Rosler" <lr@hpl.hp.com>
Subject: Re: Duplicates output data on last field
Message-Id: <6jio55$2mt@hplntx.hpl.hp.com>
[posted and emailed]
Bill 'Sneex' Jones wrote in message
<355CD7DD.95A54D7C@fccjmail.fccj.org>...
...
> ($z == 51) ? $outLine .= $_ # No Tabs on Last Element...
> : $outLine .= $_ . "\t"; # Admin1 wants TABS as
delimiter...
...
You need parentheses to control the low precedence of concatenation
assignment.
($z == 51) ? ($outLine .= $_) # No Tabs on Last Element...
: ($outLine .= $_ . "\t"); # Admin1 wants TABS as
delimiter...
But why not just this:
$outLine .= $_ . ($z == 51 ? "" : "\t");
or (more compact but perhaps more obscure):
$outLine .= $_ . ($z != 51 && "\t");
--
Larry Rosler
Hewlett-Packard Laboratories
lr@hpl.hp.com
------------------------------
Date: Sat, 16 May 1998 01:14:21 GMT
From: Bill 'Sneex' Jones <webmaster@fccjmail.fccj.org>
To: Larry Rosler <lr@hpl.hp.com>
Subject: Re: Duplicates output data on last field
Message-Id: <355CE694.39F543CD@fccjmail.fccj.org>
[Posted and Mailed]
Larry Rosler wrote:
> You need parentheses to control the low precedence of concatenation
> assignment.
>
> ($z == 51) ? ($outLine .= $_) # No Tabs on Last Element...
> : ($outLine .= $_ . "\t"); # Admin1 wants TABS as
> delimiter...
I knew my brain was malfunctioning. I forgot about the
parenthesis... That is where the bug is. Back to
the drawing board, er books I mean :-)
>
> But why not just this:
>
> $outLine .= $_ . ($z == 51 ? "" : "\t");
>
> or (more compact but perhaps more obscure):
>
> $outLine .= $_ . ($z != 51 && "\t");
I plugged in the obscure line above and it worked like a champ!
Thank you :-)
-Sneex-
____________________________________________________________________________
Bill Jones | FCCJ Webmaster | Voice 1-904-632-3089 | Fax 1-904-632-3007
Florida Community College at Jacksonville | 501 W. State St. | Jax, FL 32202
mailto:webmaster@fccjmail.fccj.org | http://webmaster.fccj.org/Webmaster
------------------------------
Date: Fri, 15 May 1998 16:12:06 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: help with quoting patterns, please
Message-Id: <63bij6.sfm.ln@localhost>
Dave Kristol (dmk@bell-labs.com) wrote:
: [Please respond by email -- I don't peruse the news group.]
Thanks.
Always looking for a chance to improve my "discard the Gimme posts"
news filter.
: Can you help me? Thanks.
Good one!
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Fri, 15 May 1998 21:01:24 -0600
From: Ignatius <lylem@plinet.com>
Subject: how do I hide or noecho terminal input
Message-Id: <355D0184.7C5C@plinet.com>
I am using STDIN to get user input. I want to display "*"s for each
character a user types in. This is to get a password from a user and I
don't want the password displayed as they type it in. How do I do this?
Thanks Lyle....
------------------------------
Date: 16 May 1998 03:14:44 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: how do I hide or noecho terminal input
Message-Id: <6jj0b4$cv8$1@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc,
Ignatius <lylem@plinet.com> writes:
:I am using STDIN to get user input. I want to display "*"s for each
:character a user types in. This is to get a password from a user and I
:don't want the password displayed as they type it in. How do I do this?
What part of the questions on ``How do I ask the user for a password?''
and ``How do I do fancy stuff with the keyboard/screen/mouse?'' in
perlfaq8 did you find particularly unhelpful?
--tom
--
echo "Your stdio isn't very std."
--Larry Wall in Configure from the perl distribution
------------------------------
Date: 16 May 1998 00:04:09 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: How to determine a perl-reserved word (string)
Message-Id: <6jil5p$ql2$1@mathserv.mps.ohio-state.edu>
[A complimentary Cc of this posting was sent to Yongyan Wang
<ywang@emma.plaza.ds.adp.com>],
who wrote in article <6jiars$k01@myst.plaza.ds.adp.com>:
> I want to determine if a string contain a perl reserved word.
>
> E.g. $a = "log" log is a perl reserved word
> $a = "tr" tr is a perl reserved word
> $a = "John" John is not a perl reserved word
With newer Perl's you may try
prototype "CORE::$a";
though I do not remember what it returns for non-overridable keywords.
Ilya
------------------------------
Date: Fri, 15 May 1998 20:07:03 -0400
From: Bob Trieger <sowmaster@juicepigs.com>
To: Ken Chesak <ken.chesak@dhs.state.tx.us>
Subject: Re: net::ftp perlwin32 cwd?
Message-Id: <355CD8A7.69CA@juicepigs.com>
[posted & mailed]
Ken Chesak wrote:
>
> I have a simple question, how do I set the type to ascii and change
> directories. The program runs but wont do these 2 items. Using Perl
> 5.004_02 on NT.
>
> use Net::FTP;
> $ftp=Net::FTP->new("$host",Debug=>1);
> $ftp->login("account","pwd");
> $ftp->cwd("d:/");
> $ftp->cwd("/netscape/server/docs/bin");
> ^^^^^^^doesnot work ^^^^^^^^^^^^^^^
I doubt the ftp's entry point for the "d:/" directory is "d:/". How
would you access this directory if FTPing from a command prompt?
> my @dirs = $ftp->dir();
> foreach (@dirs) {print "dir=$_\n";}
> $ftp->type(ascii);
> ^^^^doesnotwork^^^^^
try: $ftp -> ascii(); as seen in the faq.
> $ftp->get("upload16.cmd","c:/perltest/upload16.cmd");
HTH
--
Bob Trieger | Titanic: big boat, bigger
sowmaster@juicepigs.com | iceberg, big deal
------------------------------
Date: 16 May 1998 00:11:53 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: Non-standard use of "standard"
Message-Id: <6jilk9$r1p$1@mathserv.mps.ohio-state.edu>
[A complimentary Cc of this posting was sent to Tom Christiansen
<tchrist@mox.perl.com>],
who wrote in article <6jigfp$m9f$2@csnews.cs.colorado.edu>:
> In comp.lang.perl.misc, ilya@math.ohio-state.edu (Ilya Zakharevich) writes:
> :This is almost OK, except that DOSISH systems are almost standard (and
> :some take backward compatibility *very* seriously, hundreds times more
> :seriously than p5p crowd), and *nices are a most nonstandard batch of
> :OSes.
>
> You appear to use the word "standard" in a non-standard fashion.
> Please cite the IEEE number, the Xopen spec, the FIPS number, or any
> document produced by a non-proprietary, vendor-neutral standards committee
> that details the interfaces to Microsoft. None, right? Therefore,
> it's not standard. However, IEEE 1003.* et fils most certainly are,
> and our Unices are usefully conformant to these very important things.
Yeah, sure.
Just try to compile Perl on them without using hint files and
Configure.
Forget about full Perl. Just try to compile dumbed down microPerl
which would be enough to execute Configure-like script without using
hint files and Configure. Just enough strength to run ``, system, and
globbing.
Ilya
------------------------------
Date: 16 May 1998 00:13:53 GMT
From: arch@abts.net (Shaun Sides)
Subject: Re: perl text editor for windows95
Message-Id: <slrn6lp4mr.glh.arch@abts.net>
Original message by: Diane Strahl <jimndi@sgi.net>
Date: Thu, 14 May 1998 22:29:34 GMT
Subject: perl text editor for windows95
> Can someone recommend a good, easy-to-use text editor to use for writing
> perl programs on windows95? I used bbedit on a friend's mac, which is
> the sort of thing I'm looking for. I've looked at vim and emacs, but
> they seem more complicated than what I want. Are they worth spending the
> time to learn? What are the advantages of these? Anything out there with
> pull-down menus rather than having to memorize all the commands which
> need to be typed in? Right now I'm using the basic windows95 text
> editors - notepad and wordpad. It'd be nice to use something that at
> least had syntax coloring.
BoxerTKO
--
Shaun L. Sides arch@abts.net
Business web site http://www.abts.net/~arch
Showershoe web site http://www.abts.net/~arch/showershoe
Recreational web site http://sara.mmlc.nwu.edu/~arch
------------------------------
Date: 16 May 1998 00:04:04 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Timeout a program in Perl
Message-Id: <6jil5k$8s$1@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc, "Igor Krivokon" <igor.k@usa.net> writes:
:`at $hour:$min:$sec /NEXT:$mday kill $$`;
Please stop using backticks when you need system.
--tom
--
All language designers are arrogant. Goes with the territory... :-)
--Larry Wall in <1991Jul13.010945.19157@netlabs.com
------------------------------
Date: 15 May 1998 21:35:02 -0400
From: jbarrm@panix.com (Barry Masterson)
Subject: vec basics
Message-Id: <6jiqg6$t58@panix3.panix.com>
Can anyone here recommend any books, web sites, etc that help
describe how to understand and use the 'vec' function in perl?
'Advanced Perl Programming' (O'Reilly) gives a brief example on
pages 30-32, but I need more to make use of this function.
Please advise.
Thank you.
Barry Masterson
jbarrm@panix.com
--
>--->--->--->--->--->
FreeBSD 2.2.6
<---<---<---<---<---<
------------------------------
Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 8 Mar 97)
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 V8 Issue 2616
**************************************