[11037] in Perl-Users-Digest
Perl-Users Digest, Issue: 4637 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jan 13 03:02:49 1999
Date: Wed, 13 Jan 99 00:00:19 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Wed, 13 Jan 1999 Volume: 8 Number: 4637
Today's topics:
Re: [Q] Saving STDOUT to a logfile <partha@mihy.mot.com>
cgi/perl fuming meltdown <elephant@atlantic.net>
Re: cgi/perl fuming meltdown <ebohlman@netcom.com>
Re: CONCLUSIVE PROOF: Jesus *is* King of the Jews ! <jackiej@acay.com.au>
Re: CONCLUSIVE PROOF: Jesus *is* King of the Jews ! kd4zkw@amsat.org
Re: Generating a unique number <btate@primary.net>
Re: How can I compare two arrays? <dgris@moiraine.dimensional.com>
Re: How to stop perldoc scroll on find? <eugene@snailgem.org>
Re: NEED SCRIPT BAD!!!!!! <eugene@snailgem.org>
Re: Parsing the name from a form field name=Smith <partha@mihy.mot.com>
Re: Perl Criticism topmind@technologist.com
Re: Perl Criticism topmind@technologist.com
Re: Perl Criticism topmind@technologist.com
Re: Perl Criticism topmind@technologist.com
Re: Perl Criticism topmind@technologist.com
Re: Perl Criticism topmind@technologist.com
Re: Perl Criticism topmind@technologist.com
Re: Regular Expression Question <rick.delaney@home.com>
Re: Renaming a directory in NT. <ebohlman@netcom.com>
Seattle Perl Classes, 2/99 (Tim Maher)
Seeking Web Developer position <kris@users.qual.net>
Status of perl5.004_04 and soon-to-be perl5.004_05 (John L. Allen)
Re: tied hashed hash looses item #1 <eugene@snailgem.org>
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 13 Jan 1999 12:16:29 +0530
From: Ramanujam Parthasarathi <partha@mihy.mot.com>
To: Matt.Berney@tek.com
Subject: Re: [Q] Saving STDOUT to a logfile
Message-Id: <369C4145.29F1840A@mihy.mot.com>
Hi,
There are two (elegant) ways of doing it.
### The simpler one
Just redirect the output to another file - every OS supports it
(use something like: %mybuild > build_out)
### Using PERL
Use the select() function of PERL - see perldoc for more info
HTH
-Partha
Matt Berney wrote:
> I have created an automated build script in perl that executes our build
> process. But, I want to keep all the output that goes to STDOUT and save it to
> a file. This way, I can fire off the script and review the output later.
------------------------------
Date: Wed, 13 Jan 1999 02:06:50 -0500
From: "Glyn" <elephant@atlantic.net>
Subject: cgi/perl fuming meltdown
Message-Id: <mCXm2.4060$H3.424@news1.atlantic.net>
Ok, i admit defeat! (temporarily)
Heres the script:
#!c:\perl\bin
$|=1;
$mypic[0]="/bannerimages/test/banner1.gif";
$mypic[1]="/bannerimages/test/banner2.gif";
$mypic[2]="/bannerimages/test/banner3.gif";
$mypic[3]="/bannerimages/test/banner1.gif";
srand(time ^ $$);
$pick = rand(@mypic);
print "Content-type: image/gif\n\n";
open (BANNER,$mypic[$pick]);
print <BANNER> ;
close (BANNER);
Heres the call:
<IMG SRC="/cgi/banner.pl" WIDTH=400 HEIGHT=40 BORDER=0>
Perl location is supposedly corect, path to the banners is correct but it
dosn't work! Can anybody point me in the right direction? Please???
------------------------------
Date: Wed, 13 Jan 1999 07:33:07 GMT
From: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: cgi/perl fuming meltdown
Message-Id: <ebohlmanF5HMB7.Ju0@netcom.com>
Glyn <elephant@atlantic.net> wrote:
: Ok, i admit defeat! (temporarily)
: Heres the script:
: #!c:\perl\bin
Something's missing on the end of this line...
: $|=1;
: $mypic[0]="/bannerimages/test/banner1.gif";
: $mypic[1]="/bannerimages/test/banner2.gif";
: $mypic[2]="/bannerimages/test/banner3.gif";
: $mypic[3]="/bannerimages/test/banner1.gif";
Is that last line really correct? Did you retype your code into this post
instead of cutting and pasting? Doing so makes it hard to evaluate your
code because the reader can't distinguish a typo from a genuine coding
mistake (and even worse, it's possible that you typed the code you meant
to write instead of the code you actually wrote).
: srand(time ^ $$);
You shouldn't have to do this with modern (5.004 and above) Perls.
: $pick = rand(@mypic);
perldoc -f rand will tell you that rand() returns a random *fractional*
value. Fractional values don't make very good array indices.
: print "Content-type: image/gif\n\n";
: open (BANNER,$mypic[$pick]);
It would be nice to check if you were actually able to open the file,
wouldn't it?
: print <BANNER> ;
You're running on a Win32 system, where Perl's I/O routines will
translate things it thinks are line endings and will declare end of file
upon reading a hex 1A. perldoc -f binmode, if you please.
: close (BANNER);
: Heres the call:
: <IMG SRC="/cgi/banner.pl" WIDTH=400 HEIGHT=40 BORDER=0>
: Perl location is supposedly corect, path to the banners is correct but it
: dosn't work! Can anybody point me in the right direction? Please???
Well, you didn't say in what way it doesn't work, but I suspect the
problems I pointed out are enough to keep it from working in any way.
------------------------------
Date: Wed, 13 Jan 1999 17:37:31 +1100
From: "JAY JAY" <jackiej@acay.com.au>
Subject: Re: CONCLUSIVE PROOF: Jesus *is* King of the Jews ! ! !
Message-Id: <369c3ef3.0@job.acay.com.au>
You can say anything you like about ELVIS - But JESUS is a whole nuther
matter - May you and will you get yours
JJ
FUCAUFLED wrote in message <19990110044749.01577.00007424@ng36.aol.com>...
>
>"It sure seems fitting that your entire religion is based on worshiping a
dead
>jew on a stick"
>
> - Ron Kuby
>
>
------------------------------
Date: Wed, 13 Jan 1999 07:22:02 GMT
From: kd4zkw@amsat.org
Subject: Re: CONCLUSIVE PROOF: Jesus *is* King of the Jews ! ! !
Message-Id: <uQXm2.1267$Qn2.6186@newsfeed.slurp.net>
In rec.motorcycles.harley JAY JAY <jackiej@acay.com.au> wrote:
: You can say anything you like about ELVIS - But JESUS is a whole nuther
: matter - May you and will you get yours
:>"It sure seems fitting that your entire religion is based on worshiping a
: dead jew on a stick"
Heh, if you can't poke fun at Jesus, then who can you poke fun at ? Remember,
he died for YOUR sins, which seems to me, that he wanted 'em pretty bad.
Woe to you for the day you wake up sinless. You're gonna miss this,
I guarantee it. Making off with all your good sins, that you worked so
hard for. And the worst part is, everyone else will know it too, just
by looking at you. Plus, the sucky part is that it can happen almost
instantaneously. Like almost losing it in some gravel, and you blurt out
"Jesus!" without even realizing you said it, and the next thing you know,
your sins are all gone, and you gotta start all over.
--
- Ears - 98 XL1200C
Curtis D. Levin kd4zkw.ampr.org [44.98.2.22]
kd4zkw@amsat.org QRP-l #1488
http://dialisdn.net/user/cdlevin/
------------------------------
Date: Tue, 12 Jan 1999 23:52:35 -0600
From: "Bob Tate" <btate@primary.net>
Subject: Re: Generating a unique number
Message-Id: <369c3a11.0@news.primary.net>
You could do something list the code below:
======================= Code ===========================
($seconds, $minutes, $hour, $monthDate, $month, $year, $weekDay, $yearDate,
$dayLightSavings) = localtime(time);
$input = $month.$monthDate.$year.$hour.$seconds;
@saltchars=('a'..'z','A'..'Z','0'..'9','.','/'); # valid salt chars
srand(time|$$); # random seed
$salt=splice(@saltchars, rand @saltchars, 1); # first random salt
char
$salt.=splice(@saltchars, rand @saltchars, 1); # second random salt
char
$output = crypt($input,$salt);
======================= end code ==========================
This would generate a 13-digit field that is equiped with Upper case, lower
case and numbers that are uniquely random. It is not eight, but it should
work for you.
Daniel <daniel.mendyke@digital.com> wrote in message
news:77g0qb$ufg$3@nntpd.lkg.dec.com...
>
>I'm looking for a way to assign truely unigue id numbers
>to each visiter to a web site. I'd like to use charators as well
>as numbers and keep the number of digits to eight.
>
>One possible solution might be to use the system
>date and time to generator a unique number.
>
>How have others solved this problem?
>
>-Daniel
>
------------------------------
Date: 12 Jan 1999 23:53:23 -0700
From: Daniel Grisinger <dgris@moiraine.dimensional.com>
Subject: Re: How can I compare two arrays?
Message-Id: <m367abirz0.fsf@moiraine.dimensional.com>
Uri Guttman <uri@home.sysarch.com> writes:
> which doesn't help many people who are not using the maintenance track
> versions.
s/maintenance/devel/; # :-)
> when will such bleeding edge improvements migrate to
> production versions?
The 5.005_[5-9]x versions will eventually become 5.006.
> and when will 5.005_xx be considered stable (even
> without threads) by the masses.
_02 isn't bad (for some value of bad, I've had very few problems), _03
should be better.
> i know several places that won't go near
> 5.005 because of FUD and other issues. it has a bad rep (possibly due to
> the threads debacle)
Different people, different experiences. I've been busy as hell
installing 5.005 for people for several weeks.
> i have 5.005_02 installed at home but the primary perl here is
> 5.004_04. i use .005 to try out the features but i don't code for
> them. my workplaces all have 5.004 or so.
If you're only using it to try out the new stuff, why aren't you
using a version on the devel track? You'd probably be happier
with _54 for home use, especially considering your stated goal
of trying out new features.
dgris
--
Daniel Grisinger dgris@moiraine.dimensional.com
perl -Mre=eval -e'$_=shift;;@[=split//;;$,=qq;\n;;;print
m;(.{$-}(?{$-++}));,q;;while$-<=@[;;' 'Just Another Perl Hacker'
------------------------------
Date: Tue, 12 Jan 1999 21:31:50 -0500
From: Eugene Sotirescu <eugene@snailgem.org>
Subject: Re: How to stop perldoc scroll on find?
Message-Id: <369C0596.57670438@snailgem.org>
Charles R. Thompson wrote:
> I've noticed when say doing...
>
> perldoc -f stat
>
> Some of the text rolls off the screen. Of course I could just go
>
> perldoc stat
>
> But I rather like the quick summaries given by -f. Is there
> another switch to make it pause the output 1 screen at a time?
> perldoc perldoc didn't mention anything about it.
>
> CT
Since perdoc doesn its darnest to display the pod through a pager (via
pod2man | nroff -man | $PAGER) you must have something misconfigured. I
never had to pipe perldoc thru a pager.
>From perdoc perldoc:
"perldoc will use, in order of preference, the pager
defined in PERLDOC_PAGER, MANPAGER, or PAGER before trying
to find a pager on its own. (MANPAGER is not used if
perldoc was told to display plain text or unformatted
pod.)"
------------------------------
Date: Tue, 12 Jan 1999 22:17:44 -0500
From: Eugene Sotirescu <eugene@snailgem.org>
Subject: Re: NEED SCRIPT BAD!!!!!!
Message-Id: <369C1058.175A57D7@snailgem.org>
This is not a write-code-to-my-spec group, we help people help
themselves.
If you have tried some code, and it is Perl, and you have problems with
it, please post it with an explanation and you'll get help.
buddy gripple wrote:
> hi,
> i was wondering if anyone knows if there is a script somewhere that
> will take input entered by a user into a form text field and turn it
> into a .txt document with a filename that i can choose. i also need
> that .txt to AUTOMATICALLY OVERWRITE the current one if it exists.
> does that make any sense? is there any way to do that? can ANYONE help
> me pleeeeeeaaaassssseeeee...
>
> -bg
------------------------------
Date: Wed, 13 Jan 1999 12:24:59 +0530
From: Ramanujam Parthasarathi <partha@mihy.mot.com>
To: Evan Panagiotopoulos <evanp@technologist.com>
Subject: Re: Parsing the name from a form field name=Smith
Message-Id: <369C4343.7D40851C@mihy.mot.com>
Hi,
Use pattern matches - maybe something like
$post = "name=Smith"; # actually received from script
$post =~ /name=.*/;
$name = $1;
Note that the pattern you match will vary with your string-format.
HTH
-Partha
Evan Panagiotopoulos wrote:
> Hello to all, from a form I receive the POST containing the name
> which was submitted. How do I pick the actual name?
------------------------------
Date: Wed, 13 Jan 1999 07:11:37 GMT
From: topmind@technologist.com
Subject: Re: Perl Criticism
Message-Id: <77hgv4$21t$1@nnrp1.dejanews.com>
In article <77gvqa$jrq$1@nnrp1.dejanews.com>,
dturley@pobox.com wrote:
> In article <77g7p5$f1n$1@nnrp2.dejanews.com>,
> topmind@technologist.com wrote:
>
> > Perler's actually have
> > contests to see who can write and read the most cryptic code.
> > "Nerd Machoism" is what I call it.
>
> So? Just because you _can_ do something that makes no sense, youshould scrap
> the ability? People drive their cares really fast and die, should we take out
> the gas pedals?
>
Putting "should" aside, at least you now admit that Perl
can be hazardous and F up a company real bad. That
is a start.
> Guess you'll have to call me a name again.
>
Naw, I found someone that deserves it more than you.
> David, still not afraid to sign my naame.
>
> ____________________________________
> David Turley
> dturley@pobox.com
> http://www.binary.net/dturley/
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
>
-tmind-
http://www.geocities.com/SiliconValley/Lab/6888/
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Wed, 13 Jan 1999 07:07:39 GMT
From: topmind@technologist.com
Subject: Re: Perl Criticism
Message-Id: <77hgnn$1u2$1@nnrp1.dejanews.com>
In article <369AD320.7F59EBC2@c-zone.net>,
chatmaster@c-zone.net wrote:
> [...]
> links, out of curiosity (for jobs) that you posted, and of course, I
> felt
> it "odd" that you claimed to be an expert in Perl programming, when you
> obviously aren't. That's all I said, you wacko... why is that sort
> difficult to read? After all, you posted it.
I NEVER CLAIMED TO BE AN "EXPERT" YOU LIER!!!
I claimed to know "some".
>
> Bankrupt? How can a site that I run for free go bankrupt? You're having
> a difficult time dealing with reality here, aren't you?
>
> This is not only foolish of you to say what you are about
> the subject you are in this medium. But if you wish to take up any
> debate otherwise, then go for it. I'm not attacking you by posting that
> humorous garbage you yourself posted, nor am I embarrassing you, as
> you're doing fine all by yourself. :-)
>
> This is _very_ off the subject, then again, so is most of everything
> else you've been ranting about.
> Good day,
> Tim...
> PS: "Chat Crap", how old are you?
> I'm so happy that I've "gotten to you", it's my pleasure you know.
> Now pick on my some more, and call me a "Big stupid head" and be done
> with your stupidity, will you!
GO TO HELL YOU SICK, LYING CREEP!!!!!!!!!
> --
> Regards,
> Tim Greer - chatmaster@c-zone.net
> TRG Software and The Link Worm
> http://www.linkworm.com
> The Chat Base
> http://www.chatbase.com
> ------------------------------------------------------------
-pissedmind-
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Wed, 13 Jan 1999 07:24:20 GMT
From: topmind@technologist.com
Subject: Re: Perl Criticism
Message-Id: <77hhmt$2om$1@nnrp1.dejanews.com>
In article <fl_aggie-1201990948570001@aggie.coaps.fsu.edu>,
fl_aggie@thepentagon.com (I R A Aggie) wrote:
> In article <369A8396.A75FF78@mail.utexas.edu>, Forrest Reynolds
> <dropzone@mail.utexas.edu> wrote:
>
> [quoting someone else]
> + > Comprehension is not my major complaint. Abusability is.
> + > You should have known that if you have been following.
> + > Programmers are not altruistic--they don't give flying
> + > fudge about who has to maintain and fiquire out their
> + > software. Therefore, the language has to protect the
> + > future because programmers wont.
>
> + A language protecting the future? That sounds pretty interesting--- good
short
> + story material. Perhaps your energy is misplaced.
>
> No wonder he has a problem with perl.
>
> Many computer scientists have fallen into the trap of trying to define
> languages like George Orwell's Newspeak, in which it is impossible to
> think bad thoughts. What they end up doing is killing the creativity
> of programming.
> -- Larry Wall
Well then I have to disagree with Larry Wall a bit. For one
he assumes that creativity and cryptology are one in the same.
Second, I aim to fix the worst 3rd, not the middle or the top.
Actually, I seem to fall somewhere in between the OOPers who
are anal about protecting everything, and Perlers who think
saving keystrokes is the ultimate goal.
>
> I dunno about the rest of y'all, but usually the person who has to figure
> out and maintain my code is...ME. Ergo, it's in my own best interests to
> be disciplined and use proper programming practices.
>
> Even so, there are times when I mutter "what was I thinking? what was I
> DRINKING??"... :)
>
> James
>
-tmind-
http://www.geocities.com/SiliconValley/Lab/6888/
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Wed, 13 Jan 1999 07:15:11 GMT
From: topmind@technologist.com
Subject: Re: Perl Criticism
Message-Id: <77hh5q$2b9$1@nnrp1.dejanews.com>
In article <369AB9A4.A5C4AAF6@mediaone.net>,
"Michael D. Schleif" <mds-resource@mediaone.net> wrote:
> topmind@technologist.com wrote:
> >
> > In article <slrn79ggu1.cjr.dformosa@godzilla.zeta.org.au>,
> > dformosa@zeta.org.au (David Formosa (aka ? the Platypus)) wrote:
> > > >
> > > >@_(-->$/(.)/up/Your*$s\\|>you&%!$@#crypt=++||#@tol<>>??logists!@#
> > >
> > > Thats not valid perl.
> >
> > But I bet it is only a few keystrokes away from being runnable.
>
> Prove it, or shut up }:-^
>
All right, I will shut up on this one.
-tmind-
> --
>
> Best Regards,
>
> mds
> mds resource
> 888.250.3987
>
> "Dare to fix things before they break . . . "
>
> "Our capacity for understanding is inversely proportional to how much we
> think we know. The more I know, the more I know I don't know . . . "
>
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Wed, 13 Jan 1999 07:41:13 GMT
From: topmind@technologist.com
Subject: Re: Perl Criticism
Message-Id: <77himo$3en$1@nnrp1.dejanews.com>
In article <369ABB34.16E5B504@mediaone.net>,
"Michael D. Schleif" <mds-resource@mediaone.net> wrote:
> topmind@technologist.com wrote:
> >
> > "There is a saying in the Unix community that one should not prevent idiots
> > from abusing something because it may prevent someone else from making good
> > use of it. In other words, give everyone chain-saws because (hopefully) more
> > people will build useful things than the number who will damage something or
> > someone.
>
> In other words, let's take automobiles away until such time as somebody
> invents one that won't kill so many people on our highways?
>
> You seem to miss the point of many here: We make very good use of Perl.
> Many of us here who have participated in this thread are living better
> today than ever -- and Perl, the status quo and its dialectic,
> evolutionary path, has contributed to that.
>
Are you judging Perl by its ability to project your job by
being too hard for a new programmer to figure out?
If that *is* the criteria, then you are right.
And yes, companies WOULD take company cars AWAY from
employees if they were screwing things up.
Like I said before, I would not mind writing in Perl for
someone else, but I would not bet my own company on
Perl done by others because of the great risk of
"spehgetti code job security".
Hey, let's bring back Goto's. I saw all kinds of
job security in those things.
> If you are *not* in that camp, perhaps you will find something else
> todo. Perhaps, you will go live in a box out in the alley . . .
Or, get money by screwing others by selling crack. Perl is not
the only way to succeed by screwing others.
(Okay, so the analogy is a little extreme.)
>
> What else can we do? Do you begrudge us our success ???
>
> --
>
> Best Regards,
>
> mds
> mds resource
> 888.250.3987
>
> "Dare to fix things before they break . . . "
>
> "Our capacity for understanding is inversely proportional to how much we
> think we know. The more I know, the more I know I don't know . . . "
>
-tmind-
http://www.geocities.com/SiliconValley/Lab/6888/
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Wed, 13 Jan 1999 07:28:14 GMT
From: topmind@technologist.com
Subject: Re: Perl Criticism
Message-Id: <77hhu6$2sb$1@nnrp1.dejanews.com>
In article <yllnj9duej.fsf@windlord.stanford.edu>,
Russ Allbery <rra@stanford.edu> wrote:
> topmind <topmind@technologist.com> writes:
>
> > How can you say that all languages are *equally* abusable?
>
> That's not what I'm saying. What I'm saying is that given an experienced
> programmer, it really doesn't matter that much, and given inexperienced
> programmers, it's noise lost in the other things that will be problematic.
Lack of experience is not what I am fussing about. It is those
who take shortcuts at the expense of others or the longer term
integrity of the system.
>
> > Do you have any arguments or examples besides an internal opinion?
>
> Mostly just personal experience.
>
> --
> #!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
> $^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
> 00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
> rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print
>
-tmind-
http://www.geocities.com/SiliconValley/Lab/6888/
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Wed, 13 Jan 1999 07:32:15 GMT
From: topmind@technologist.com
Subject: Re: Perl Criticism
Message-Id: <77hi5v$309$1@nnrp1.dejanews.com>
In article <slrn79l8fa.mtj.dformosa@godzilla.zeta.org.au>,
dformosa@zeta.org.au (David Formosa (aka ? the Platypus)) wrote:
> In article <77e5si$kvu$1@nnrp1.dejanews.com>, topmind@technologist.com wrote:
>
> [...]
>
> >How can you say that all languages are *equally* abusable?
>
> I know a programer because english is his second langage names all his
> verables and funtions with sequetionaly rising alphanumric codes (like
> perls magical autoincrement) if you can read code where everthing is
> AACD123 then you are a better man then I.
>
That is what I labelled as "atomic-level abuse", whereas, some
languages allow "sub-atomic level abuse" also. At least you
still could tell that "AACD123" was a function.
> --
> Please excuse my spelling as I suffer from agraphia. See
> http://www.zeta.org.au/~dformosa/Spelling.html to find out more.
> How to win arguments on usenet http://www.zeta.org.au/~dformosa/usenet.html
>
>
-tmind-
http://www.geocities.com/SiliconValley/Lab/6888/langopts.htm
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Wed, 13 Jan 1999 06:04:20 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: Regular Expression Question
Message-Id: <369C3933.64F40A18@home.com>
[posted & mailed]
[removed comp.lang.misc]
parab0la@my-dejanews.com wrote:
>
> Hi all!
>
> I'm try to match the pattern /helloworld/ or /byeworld/. Is there any
> way that I can combine them in one regexp, something like
> /\(hello|bye\)world/ ?
Close, but you don't want to backwhack the brackets since you want their
special regex meaning (grouping).
What you have will match '(hello' or 'bye)world'. Try this:
/(hello|bye)world/;
perldoc perlre
--
Rick Delaney
rick.delaney@shaw.wave.ca
------------------------------
Date: Wed, 13 Jan 1999 07:18:59 GMT
From: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: Renaming a directory in NT.
Message-Id: <ebohlmanF5HLnn.J2u@netcom.com>
Kris Davey <mivl@inquo.net> wrote:
: I have a quick question that has been kicking my ass for a while now. It
: should be very simple and I'm probably overlooking something. Here's the
: problem I have created a script that FTP's trace files off our solaris
: server to make them available to everyone on a Windows platform. The
: script creates a \tmp directory FTp's all the files into the directory,
: pulls the current date and formats it. The problem is that I cannot seem
: to rename the file to the date, stored in $_. Here is what I've tried
: `ren e:\tmp $_`
: `ren e:\tmp "$_"`
: system ("ren e:\tmp $_") *** This actually worked on Win98 at home.
Well, a big part of your problem is that you probably don't have a file
whose name consists of a tab character followed by "mp" in the root of
your e: drive. Remember that backticks impose a doublequotish context,
so you need to double up backslashes if you want to represent them literally.
You should also be using Perl's rename() function rather than starting a
separate process to do something as simple as renaming.
------------------------------
Date: 13 Jan 1999 06:54:53 GMT
From: yumpy@halcyon.com (Tim Maher)
Subject: Seattle Perl Classes, 2/99
Message-Id: <77hfvt$agc$1@brokaw.wa.com>
Keywords: perl training pacific nw seattle
From: Tim Maher, CONSULTIX
To: Former and Future Students
RE: Announcing February Perl Classes
We've just arranged to offer these classes, which
I'll be teaching. For more details, see our Web page.
Course: Perl Programming
Dates: 2/22-2/25/99 (Mon-Thu)
Time: 8am-4pm (initially; changeable by student vote)
8am-noon, Thursday
Place: Seattle WA USA
Price: US $1,250
Course: Perl Programming (with CGI)
Dates: 2/22-2/26/99 (Mon-Fri)
Time: 8am-4pm (initially; changeable by student vote)
8am-noon, Friday
Place: Seattle WA USA
Price: US $1,750
The classes will be one class until Thursday at noon, when the
folks who don't care about CGI will leave.
*==================================================================*
| Tim Maher, PhD CEO, Consultix & (206) 781-UNIX/8649 |
| Pacific Software Gurus, Inc. Email: tim@consultix-inc.com |
| "The UNIX/Perl Training Experts" http://www.consultix-inc.com |
*==================================================================*
------------------------------
Date: Wed, 13 Jan 1999 07:39:28 GMT
From: Kris <kris@users.qual.net>
Subject: Seeking Web Developer position
Message-Id: <3622F471.35377BCE@users.qual.net>
Due to lay-offs at a local Internet company, I am available for hiring
as a Web Developer. I have a Bachelor of Science degree, and I've been
designing Web pages on a freelance basis for a year, before being hired
by the company I was just laid-off from. I am fluent in HTML and have a
solid understand of Perl, CGI, and Javascript. An example of my work
can be seen at: http://www.fit2print.com/ and my resume can be viewed
at: http://www.fit2print.com/resume/index.html
Thank you for your consideration.
Sincerely,
Kris Bernardic
------------------------------
Date: 12 Jan 1999 14:32:16 -0500
From: allen@gateway.grumman.com (John L. Allen)
Subject: Status of perl5.004_04 and soon-to-be perl5.004_05
Message-Id: <77g800$ac6@gateway.grumman.com>
According to CPAN/src,
latest_is_5.005_02
stable_is_5.005_02
devel_is_5.005_53
What then is 5.004_04, obsolete? And what will 5.004_05 be when
or if it is ever released? I'm beginning to think there is no
point to releasing 5.004_05.
--
_/JohnL\_allen@gateway.grumman.com <Sun>: 9.5 billion pounds per sec to energy
~\Allen/~Fax: 516-575-7428 <Universe>: 1e22 stars = 22 solar masses per sec
------------------------------
Date: Tue, 12 Jan 1999 21:50:32 -0500
From: Eugene Sotirescu <eugene@snailgem.org>
Subject: Re: tied hashed hash looses item #1
Message-Id: <369C09F8.A34A0B15@snailgem.org>
The values in a DBM have to be strings or numbers.
AFAIK, the only DBM implementations that can handle references is MLDBM.
JPAH-FLA wrote:
> I apologize if this post arrives twice- I posted it around 23 Dec but it
> never showed up, so I'm trying again.
>
> I'm finding that an anon hashed hash tied with dbmopen consistently
> looses the fist item of each hash. I've demonstrated it in W32 as well
> as unix. I couldn't find any reference to this issue in Camel or this
> newsgroup or websites, but not for lack of trying!
>
> I created a hashed hash similar to the example in camel 2nd Ed P 270. It
> worked fine:
>
> $h{tom}{ctype} = "cat"; $h{tom}{colour} = "brown"; $h{tom}{build} =
> "fat";
> $h{tim}{ctype} = "cat"; $h{tim}{colour} = "white"; $h{tim}{build} =
> "slim";
>
> foreach $cat (keys %h)
> {print "cat: $cat\n";
> foreach (keys %{ $h{$cat} })
> {print "$_ => $h{$cat}{$_}\n";
> }
> }
>
> produces the desired result:
>
> >perl cats.pl
> cat: tom
> build => fat
> colour => brown
> ctype => cat
> cat: tim
> build => slim
> colour => white
> ctype => cat
>
> However, when I use the same exact code, but tie h to a dbm with:
>
> dbmopen %h, $DB, 0766 || die "cant open DBM: $!\n";
>
> All of the %h{cat_i}{ctype}'s vanish:
>
> cat: tom
> build => fat
> colour => brown
> cat: tim
> build => slim
> colour => white
>
> Any particular reason? Do I need to define %h differently if I'm tying
> it?
>
> Thank-You..
------------------------------
Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>
Administrivia:
Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing.
]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body. Majordomo will then send you instructions on how to confirm your
]subscription. This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.
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 4637
**************************************