[8453] in Perl-Users-Digest
Perl-Users Digest, Issue: 2070 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Mar 11 09:29:33 1998
Date: Wed, 11 Mar 98 06:01:09 -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, 11 Mar 1998 Volume: 8 Number: 2070
Today's topics:
? on http://www.perl.com/CPAN-local/doc/FMTEYEWTK/sort. <fp@pmpcs.com>
Re: ? on http://www.perl.com/CPAN-local/doc/FMTEYEWTK/s <jdporter@min.net>
Re: array question <ebohlman@netcom.com>
Re: array question (Alastair R W Kerr)
attachments (Robert)
Automating Visual C 5.0 builds with Perl [FAQ] (Daniel R. Kegel)
Re: Brand new and completely bewildered!!! <ebohlman@netcom.com>
Checking filedate in perl (Bjorn Malmberg)
detecting failures in glob <andrew@corp.webtv.net>
difference between 's' and 'tr' (Carl David)
First Line for a Perl File in NT slnlz@cc.usu.edu
Re: Formatting telephone numbers - How to? <NerveGas@see_signature.com>
Re: Help wanted <ebohlman@netcom.com>
HELP!! Can't get PERL script to work.. <dragon@soback.kornet.nm.kr>
Re: HELP!! Can't get PERL script to work.. <Geert.Roovers@POBoxes.com>
Re: HELP!! Can't get PERL script to work.. <Geert.Roovers@POBoxes.com>
HELP, can't get PERL script to work through web browser <dragon@soback.kornet.nm.kr>
How to embed special characters in replacement string? (Leon Poon)
Re: More thoughts on c.l.p.m. <ebohlman@netcom.com>
Re: multiple blank lines into one (Koos Pol)
perl binary for SGI <kamari@fhw.gr>
Printing Hash of Hashes Problem toml@synnet.com
Re: Problem with "goto" in Perl <ebohlman@netcom.com>
Re: Problem with "goto" in Perl (Tony Fitzgerald)
Re: Problem with filenames on NT <ebohlman@netcom.com>
test message: please ignore <hyperion@ideo.com>
Why doesn't ' s/\(/#LPAREN#/gi; ' work? !! <#tdarling@glue.umd.edu#>
Re: Why doesn't ' s/\(/#LPAREN#/gi; ' work? !! <ckc@dmi.dk>
Re: Wierd redirection problem with Location: culrich@i2000.net
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 11 Mar 1998 07:58:45 -0500
From: "Peter Perchansky" <fp@pmpcs.com>
Subject: ? on http://www.perl.com/CPAN-local/doc/FMTEYEWTK/sort.html --- Sorting ?
Message-Id: <6e61v3$44o$1@usenet41.supernews.com>
Greetings:
I'm trying to understand Tom Christiansen's article on "Far More Than
Everything You've Ever Wanted to Know About Sorting" at
http://www.perl.com/CPAN-local/doc/FMTEYEWTK/sort.html in terms of applying
it to sorting on any given field.
Here is a sample of the data:
1998211065546 Wednesday, March 11, 1998 at 06:55:46 Peter Perchansky
Staff
1998211065846 Wednesday, March 11, 1998 at 06:58:46 Marilyn Faughner
Camper
1998211070038 Wednesday, March 11, 1998 at 07:00:38 Lori Perchansky
Parent
1998211071504 Wednesday, March 11, 1998 at 07:15:04 Sam Perchansky
Parent
Each line ends with a new line ("\n"), and each field is tab ("\t")
separated. I need to be able to sort either on the first field (serialized
date and time) or the 3rd field (name).
Here is the code:
my $bigstring;
my $fh = new FileHandle "</u/web/pmpcsc/_private/guestbook.dat";
while ($_ = $fh->getline)
{
chop;
$bigstring .= $_ . "\n";
} ## END while
undef $fh; ## close file
my @lines = split( /\n/, $bigstring);
my @listrefs = map { [$_, (split('\t', $_))[2] ] } @lines;
my @newrefs = sort { $a->[1] <=> $b->[1] } @listrefs;
my @data = map { $_->[0] } @newrefs;
$bigstring = join("<BR>", @data) . "<BR>";
The above is trying to sort on the 3rd field ([2] in the array); however,
when I display the results I get the following (shortened to just that
field):
Sam Perchansky
Lori Perchansky
Marilyn Faughner
Peter Perchansky
If I change the map to use [0], I do get it sorted by the serialized date.
I've tried other positions in the array, but don't get the expected or
desired results.
I've also tried the code for section 8.2, but I'm not sure what to pass in
terms of +Xn.
What am I doing wrong or missing? Please reply via newsgroup and email if
convenient by email.
Thank you for your time.
--
===========================================================
Peter Perchansky, Computer Consultant & Microsoft FrontPage MVP
Dynamic Net, Inc. DBA PMP Computer Solutions
Providing Dynamic Databases, Design, & Electronic Commerce Solutions
FrontPage Web Hosting at http://www.pmpcs.com/services/fpwebhosting.htm
FrontPage Support http://www.pmpcs.com/support/frontpage.htm
------------------------------
Date: Wed, 11 Mar 1998 08:47:28 -0500
From: John Porter <jdporter@min.net>
Subject: Re: ? on http://www.perl.com/CPAN-local/doc/FMTEYEWTK/sort.html --- Sorting ?
Message-Id: <350695F0.5C24@min.net>
Peter Perchansky wrote:
> [...]
Short answer: you need "\t" instead of '\t'.
That is, double quotes instead of single quotes.
It has to do with interpreting special characters, e.g. backslash,
in the string.
By the way, I hope you realize the inefficiency of joining the lines
together with newlines, then splitting it apart again on newlines.
Why not just push each line onto @lines as you get them?
hth,
John Porter
------------------------------
Date: Wed, 11 Mar 1998 11:48:40 GMT
From: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: array question
Message-Id: <ebohlmanEpnKt4.MDM@netcom.com>
mchunziker@us.fortis.com wrote:
: I would like to scan the /dev directory for vg?? and stuff them into
: an array or scaler....no problem so far...easy enough....but I also want to
: create a new array based on a variable...in other words if I find vg00
: I want to create a @vg00 array. Is there a way to create an array using
: a variable...I've been unable to figure out a way to do it without a bunch
: of if's and elsif's....I know something silly like @$VG= isn't going to
: get me very far! Thanks in advance....
When you find yourself trying to do something like that, you should think
instead of creating an appropriate data structure, such as a hash of
arrays (which is actually shorthand for "a hash of array references").
The perldata, perlref, perllol and perldsc documents will show you how to
do this.
------------------------------
Date: 11 Mar 1998 13:25:31 GMT
From: pdxark@evol.nott.ac.uk (Alastair R W Kerr)
Subject: Re: array question
Message-Id: <6e63cb$cig@paperboy.ccc.nottingham.ac.uk>
In article <6e4ei5$6up$1@nnrp1.dejanews.com>,
<mchunziker@us.fortis.com> wrote:
>Perhaps this can't be done since I can't find a reference in
>Camel, Llama or TYP 21 days......
>
>I would like to scan the /dev directory for vg?? and stuff them into
>an array or scaler....no problem so far...easy enough....but I also want to
>create a new array based on a variable...in other words if I find vg00
>I want to create a @vg00 array. Is there a way to create an array using
>a variable...I've been unable to figure out a way to do it without a bunch
>of if's and elsif's....I know something silly like @$VG= isn't going to
>get me very far! Thanks in advance....
>
>mchunziker@us.fortis.com
Check out the perlref man pages for extra help. Also you might want to
consider rethinking your data structures as using 'soft' references
can get abit confusing (some would consider it bad programming
practice to use them in the 1st place).
Basically the following should work.
$vg->[$array_element]
where $vg is "vg00" etc, you should be able to store and extract
information using this syntax. (certainly it works for me in some of
my more dodgy scripts).
and as a precaution, add in the block:
no strict 'refs';
- Al
------------------------------
Date: Wed, 11 Mar 1998 13:14:48 GMT
From: colte@hem.passagen.se (Robert)
Subject: attachments
Message-Id: <35068d09.9834510@news.hogia.net>
Does anyone know if it is possible to attach a simple textfile to a
mail message using sendmail or blat ?
The reason I want to do this is because I want people to fill out a
form. The data from that form will be written in a file that I want to
attach to a mailmessage.
Is this posible ?
Robert
------------------------------
Date: 11 Mar 1998 10:22:01 GMT
From: dank@alumnae.caltech.edu (Daniel R. Kegel)
Subject: Automating Visual C 5.0 builds with Perl [FAQ]
Message-Id: <6e5ok9$sdt@gap.cco.caltech.edu>
I'm collecting info on how to automate Visual C builds with Perl at
http://alumni.caltech.edu/~dank/msdev.htm
Don't have the answer there yet, but it's a start.
Many thanks to DejaNews and Altavista as usual, even if this time it was
like pulling teeth :-)
- Dan
------------------------------
Date: Wed, 11 Mar 1998 11:37:51 GMT
From: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: Brand new and completely bewildered!!!
Message-Id: <ebohlmanEpnKB3.M2H@netcom.com>
scott@softbase.com wrote:
: Sarah Medway (sarah@shiver.demon.co.uk) wrote:
: > Am I being to ambitious to even contemplate doing this...
: Unless you are an *extremely* fast learner, you're in way
: over your head. You need to get a good Perl book
: like Learning Perl (throw the Dummies stuff in the trash)
: and learn the basics before even starting CGI programs.
No argument here.
: > ... as it is a skill that takes years to master?
: With no prior UNIX experience with regular expressions and
: grep, awk, sed or similar utilities I'd say years would be
: accurate. Most people who learn Perl faster already know a little
: awk and C. If you're starting from scratch, Perl is a
: formidible language simply because it draws from so many
: sources.
It depends on what you mean by "master." True mastery would indeed take
years, but getting to the point of being able to write the required
program could be done in a matter of months.
: Even if you know Perl, you still have to learn CGI programming.
: That alone is very difficult, since every machine has a different
: way of handling it.
Huh? CGI.pm makes those differences almost completely transparent to the
programmer. And understanding the CGI interface is *not* that hard. If
you can grasp the notion of statelessness, you're over the biggest
hurdle. There's nothing particularly unusual about CGI programming.
------------------------------
Date: Wed, 11 Mar 1998 13:49:33 GMT
From: news@NOSPAMgb-design.com (Bjorn Malmberg)
Subject: Checking filedate in perl
Message-Id: <35069504.4789335@news.algonet.se>
Hi all!!
Thanks a lot for all the help on my rand prob.. the script works fine
now!
OK, so I need to check a file when it was written now... if the file
is not written that day, the perl script should write to it, but if it
was written the same day, not write to it... that should be no
problem, I think.. however, how could I check when the file was
written last time in perl?
I use perl for win32 (5.003) Could I make a system command (dir) and
take the date from there perhaps? Any help on this is appreciated,
same as before... please CC a copy to my mailbox taking away the
NOSPAM thing in my address! Can't look so very much on the newsgroup
right now since inet cost so damn much here in Sweden ! :)
Thanks for any help on this !
Bjorn
____________________________________________________
Take away the word NOSPAM to make an email reply! :)
------------------------------
Date: Tue, 10 Mar 1998 15:26:32 -0800
From: Andrew Simms <andrew@corp.webtv.net>
Subject: detecting failures in glob
Message-Id: <3505CC28.AF8D9E18@corp.webtv.net>
I recently hit a problem where a large script was producing some bogus
output, basically as a result of never executing some cleanup code.
Stepping in the debugger I found that a call to glob before the cleanup
code was returning empty list instead of the files (which were present
in readable directories) to be cleaned up.
Turning warnings on shed some light, a message about attempting to read
from an already closed file handle, but it still wasn't clear me what I
should be testing to insure that glob succeeded (and possibly just
didn't match any filenames).
So, what's the correct way to test for success of glob?
--
Andrew Simms WebTV Networks, Inc.
andrew@microsoft.com
------------------------------
Date: Wed, 11 Mar 98 08:17:32 EST
From: CHADM1@UConnVM.UConn.Edu (Carl David)
Subject: difference between 's' and 'tr'
Message-Id: <17F16749CS86.CHADM1@UConnVM.UConn.Edu>
Keywords: substitute translate
I have been attempting to create pages for readers to learn aspects of Perl
vis-a-vis CGI programming, and came across a problem which I can not solve.
I wonder if someone can lend me a hand?
http://www.sp.uconn.edu/~cdavid/cgi-bin/regexp.pl is the URL in question, and
it works for substitution.
But, when I attempt a translation using the same basic scheme:
http://www.sp.uconn.edu/~cdavid/cgi-bin/tr_test.pl
I get very strange results.
If in the perl program one write tr/a/A one gets uppercase translation, but if
one writes:
$a = 'a';
$A = 'A';
$b =~ tr/$a/$A/;
well, to be honest, nothing happens.
Is this a unwritten piece of the Perl scheme of things; have I coded wrong; is
there an alternate way of effecting the same thing so that one can learn how
the tr command works by trial and error?
Thanks for any help you can give.
And, please, could you respond directly, as it is very hard to follow this news
group via the IBM mainframe.
Thanks.
Carl David
------------------------------
Date: 10 Mar 98 08:42:26 MDT
From: slnlz@cc.usu.edu
Subject: First Line for a Perl File in NT
Message-Id: <9h2hdQG$8scg@cc.usu.edu>
Hi there
What is the first line for a perl file in a windows NT environment? In
Unix it looks like #!/usr/bin/perl or so, how about that in NT? Thank you for
your help.
james
slnlz@cc.usu.edu
------------------------------
Date: Tue, 10 Mar 1998 14:59:09 -0700
From: NerveGas <NerveGas@see_signature.com>
Subject: Re: Formatting telephone numbers - How to?
Message-Id: <3505B7AD.7F0@see_signature.com>
> > dashes) on an html page with dashes inserted. The database contains both
> > US and international phone numbers. I want to put in dashes as in the
> > following:
> > 999-999-9999 in all cases.
>
> Just curious, but why would you want to force NANPA "looks"
> to numbers which AREN'T part of NANPA? That doesn't seem to
> make much sense. I mean, I'm a `Merkin and all, but isn't it
> awful ethnocentric to say "this is the only way to write a
> phone number"?
Only as ethnocentric as only posting in English. : )
steve
--
----------------------------------------
Domain name for replying is "inconnect".
----------------------------------------
------------------------------
Date: Wed, 11 Mar 1998 10:24:44 GMT
From: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: Help wanted
Message-Id: <ebohlmanEpnGx8.JMy@netcom.com>
Craig Berry <cberry@cinenet.net> wrote:
: philip Martin (philip@pmwd.com) wrote:
: : while(<SCRIPT>){
: : $name .= $_;
: : }
: Or, far more efficiently,
: undef $/;
: $name = <SCRIPT>;
Or, a little bit safer,
{local $/;
$name = <SCRIPT>;
}
just in case you're going to be reading something else line-by-line later on.
------------------------------
Date: Wed, 11 Mar 1998 19:51:11 +0900
From: "Sanghyun Lee" <dragon@soback.kornet.nm.kr>
Subject: HELP!! Can't get PERL script to work..
Message-Id: <6e5qc9$e4r$2@news.kornet.nm.kr>
OK, I wrote a simple Perl script. I ran it on my ISP (UNIX) through Telnet.
It appeared to work. Then I typed in the address of the script through my
web-browser. It just printed the whole script out instead of running it!!
What's wrong?
Also is there anyway to use C to write CGI scripts? I tried C too but it
just returns a 500 error... Maybe you have to compile the thing under a UNIX
compiler? Where do I get one of these if they are available??
Please help me to get PERL CGI to work in web browser...
Or better yet help me get C/C++ CGI to work...
Or even better help me get both to work...
Note: I am a complete beginner and know next to nothing about UNIX, CGI,
PERL, etc. etc. etc.
PS. Please E-mail reply also...
Thanks
------------------------------
Date: Wed, 11 Mar 1998 12:04:27 +0100
From: Geert Roovers <Geert.Roovers@POBoxes.com>
To: Sanghyun Lee <dragon@soback.kornet.nm.kr>
Subject: Re: HELP!! Can't get PERL script to work..
Message-Id: <35066FBB.694E@POBoxes.com>
Are you sure that you copy the scripts into a valid CGI directory on the
webserver (this is usualy cg-bin). Ask your ISP if you are allowed to
have perl scripts, and -if so - where they have to be uploaded to.
I think C progs should be compiled on the system where they will be ran
(UNIX in your case), but I'm not sure about this. But even if you did,
you still need to know where the cgi directory is (and if you are
allowed to use it too) Contact your ISP
~Geert
Sanghyun Lee wrote:
>
> OK, I wrote a simple Perl script. I ran it on my ISP (UNIX) through Telnet.
> It appeared to work. Then I typed in the address of the script through my
> web-browser. It just printed the whole script out instead of running it!!
> What's wrong?
> Also is there anyway to use C to write CGI scripts? I tried C too but it
> just returns a 500 error... Maybe you have to compile the thing under a UNIX
> compiler? Where do I get one of these if they are available??
>
> Please help me to get PERL CGI to work in web browser...
> Or better yet help me get C/C++ CGI to work...
> Or even better help me get both to work...
>
> Note: I am a complete beginner and know next to nothing about UNIX, CGI,
> PERL, etc. etc. etc.
>
> PS. Please E-mail reply also...
> Thanks
------------------------------
Date: Wed, 11 Mar 1998 12:06:30 +0100
From: Geert Roovers <Geert.Roovers@POBoxes.com>
Subject: Re: HELP!! Can't get PERL script to work..
Message-Id: <35067036.63A0@POBoxes.com>
Geert Roovers wrote:
>
> webserver (this is usualy cg-bin). Ask your ISP if you are allowed to
No it's not.... it's usualy cgi-bin
------------------------------
Date: Wed, 11 Mar 1998 19:46:44 +0900
From: "Sanghyun Lee" <dragon@soback.kornet.nm.kr>
Subject: HELP, can't get PERL script to work through web browser
Message-Id: <6e5q3s$drj$2@news.kornet.nm.kr>
OK, I wrote a simple Perl script. I ran it on my ISP (UNIX) through Telnet.
It appeared to work. Then I typed in the address of the script through my
web-browser. It just printed the whole script out instead of running it!!
What's wrong?
Also is there anyway to use C to write CGI scripts? I tried C too but it
just returns a 500 error... Maybe you have to compile the thing under a UNIX
compiler? Where do I get one of these if they are available??
Please help me to get PERL CGI to work in web browser...
Or better yet help me get C/C++ CGI to work...
Or even better help me get both to work...
Note: I am a complete beginner and know next to nothing about UNIX, CGI,
PERL, etc. etc. etc.
PS. Please E-mail reply also...
Thanks
------------------------------
Date: 9 Mar 1998 18:15:24 GMT
From: lpoon@Glue.umd.edu (Leon Poon)
Subject: How to embed special characters in replacement string?
Message-Id: <6e1bjs$hap$1@hecate.umd.edu>
Hi,
How does one embed special characters like \n, \t, etc. in the
replacement string and have it interpreted by perl? Recently, I
wanted to replace some words in a file with a multiline replacement,
but I don't know how to do it with perl regex.
For example, I want
blah[return]blah[return]blah[return]
to be replaced by
blah
blah
blah
How would I set up the perl regex to accomplish the above.
Any help would be greatly appreciated. Thanks.
Leon Poon
------------------------------
Date: Wed, 11 Mar 1998 10:38:07 GMT
From: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: More thoughts on c.l.p.m.
Message-Id: <ebohlmanEpnHJJ.K17@netcom.com>
Alex Schajer <alexs@online.emap.com> wrote:
: What might be a nide idea is a chat c.l.p.m for that purpose. People who have
: easy/simple questions, like 'last element in an array' or 'sorting hash
: tables' which many of the more experience perl users could answer in a second.
: This will free up the c.l.p.m group for serious discussin and debate where a
: record of the discussion is needed.
: This could be a 'drop in session' - a chat based system, similar to a
: talker/mud.
How about a Web page with a form and CGI script that parses a question and
returns a page consisting of the sections of the documentation that are
most likely to answer the question (actually, links to the appropriate
sections)?
About 10-15 years ago I remember reading a journal article about a campus
computer lab that tried using a version of Eliza to take FAQs and answer
them. Apparently it was quite successful (it *may* have been in
_Software: Practice and Experience).
Of course, you could always include a version of the script, set up for
interactive input, with the Perl distribution itself, but FAQtoids
probably wouldn't use it because it isn't on the Net :(
------------------------------
Date: 11 Mar 1998 12:18:11 GMT
From: koos@stag (Koos Pol)
Subject: Re: multiple blank lines into one
Message-Id: <6e5ve3$3fk@news.nl.compuware.com>
SenimotBor (tomines@rohan.sdsu.edu) wrote:
: How do you substitute multiple consecutive blank lines for one blank line.
undef $/; # disable record seperator (i.e.: \n)
open (FH,'temp.txt') || die "Can't open file";
$_ = <FH>; # read the whole file on one big chunk
close FH;
s/\n{3,}/\n\n/sg; # note: 2 \n's give one blank line
--
Koos Pol
----------------------------------------------------------------------
S.C. Pol tel: +31 20 3116122
Systems Administrator email: Koos_Pol@bigfoot.com
Compuware Europe PGP public key available upon request
A little inaccuracy sometimes saves tons of explanation.
-- H. H. Munroe
------------------------------
Date: Wed, 11 Mar 1998 15:04:28 +0200
From: George Kamarinos <kamari@fhw.gr>
Subject: perl binary for SGI
Message-Id: <35068BDC.554C@fhw.gr>
I am looking for a perl binary for an SGI Irix 6.2
I checked CPAN but could not find it. Any pointers would be greatly
appreciated.
Thank you
--
*------------------------------------------------------*
George Kamarinos <kamari@fhw.gr>
Internet Programmer < http://www.fhw.gr/~kamari >
Foundation of the Hellenic World < http://www.fhw.gr/ >
15 Akademias st., 10671 Athens, Greece
Tel: (+30 1) 3626776, 3626531, Fax: (+30 1) 3628796
------------------------------
Date: Wed, 11 Mar 1998 07:37:29 -0600
From: toml@synnet.com
Subject: Printing Hash of Hashes Problem
Message-Id: <6e6409$dbm$1@nnrp1.dejanews.com>
Greetings:
I have a script which prints out expiring entries
in a flexlm license file. I'm getting different
results in different windows. It's built as a hash
of hashes:
$matrix = [$_, $file, $result];
push (@{$file_index{$file}}, $matrix);
How I print it is like so:
foreach $i (sort keys %file_index) {
foreach $rl (sort @{$file_index{$i}}) {
if (($rl->[1] ne $filename) || ($rl->[2] != $days)) {
print "\n";
print "The license(s) in $rl->[1] will expire in $rl->[2]
days:\n";
$filename = $rl->[1];
$days = $rl->[2];
}
printf " %-96s\n",$rl->[0];
}
}
Sometimes the results are like so:
The license(s) in /d/l1/flexlm/key will expire in 1 days:
FEATURE clio_sos cliolmd 1.000 5-Mar-1998 5 ECF492150BC4A9751CCF
ck=1
The license(s) in /d/l1/flexlm/key will expire in 6 days:
FEATURE fcengine attcad 5.000 10-mar-1998 1
EB88E1FFAC5B6B1B0179 "15"
FEATURE odan attcad 5.000 10-mar-1998 1
CB48417F304DAABCE280 "15"
FEATURE fcheck attcad 5.000 10-mar-1998 1
9B1801CFE21BD41B0E9B "15"
The license(s) in /d/r2/flexlm/key will expire in 27 days:
INCREMENT hspice metasoftd 1997.1231 31-mar-98 3 EC221ED111C17E4E2BC6
\
INCREMENT metawaves metasoftd 1997.1231 31-mar-98 1
2C12DBF35DEBACE65C3E \
INCREMENT hspice metasoftd 1997.1231 31-mar-98 3 BC62BB538F7974A6C39E
\
INCREMENT metawaves metasoftd 1997.1231 31-mar-98 1
0CA2EEB1D0FBCBDCE350 \
Which is what I want. The license(s) expiring first at the top, but
in a different window with the LM_LICENSE_FILE enviornment variable
set the same I get:
The license(s) in /d/l1/flexlm/key will expire in 6 days:
FEATURE fcengine attcad 5.000 10-mar-1998 1
EB88E1FFAC5B6B1B0179 "15"
FEATURE odan attcad 5.000 10-mar-1998 1
CB48417F304DAABCE280 "15"
FEATURE fcheck attcad 5.000 10-mar-1998 1
9B1801CFE21BD41B0E9B "15"
The license(s) in /d/l1/flexlm/key will expire in 1 days:
FEATURE clio_sos cliolmd 1.000 5-Mar-1998 5 ECF492150BC4A9751CCF
ck=1
The license(s) in /d/r2/flexlm/key will expire in 27 days:
INCREMENT hspice metasoftd 1997.1231 31-mar-98 3 BC62BB538F7974A6C39E
\
INCREMENT metawaves metasoftd 1997.1231 31-mar-98 1
0CA2EEB1D0FBCBDCE350 \
INCREMENT hspice metasoftd 1997.1231 31-mar-98 3 EC221ED111C17E4E2BC6
\
INCREMENT metawaves metasoftd 1997.1231 31-mar-98 1
2C12DBF35DEBACE65C3E \
Any ideas? Thanks any help in advanced.
Tom
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading
------------------------------
Date: Wed, 11 Mar 1998 10:09:27 GMT
From: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: Problem with "goto" in Perl
Message-Id: <ebohlmanEpnG7r.J62@netcom.com>
Steve Linberg <linberg@literacy.upenn.edu> wrote:
: I use GOTO quite a lot (after about 15 years of avoiding it like the
: plague) in circumstances where there are many steps being taken in a
: function, each of which may fail, and where simply quitting with an error
: code isn't an option becuase there is cleaning up to do first.
Why not put the code in question inside an eval() block, die() if
something goes wrong, and after the block test $@ to see if you need to
clean up?
------------------------------
Date: 9 Mar 1998 23:23:06 -0400
From: jaf@sarastro.unb.ca (Tony Fitzgerald)
Subject: Re: Problem with "goto" in Perl
Message-Id: <6e2bmq$mjh@sarastro.unb.ca>
In article <889479303.359052@thrush.omix.com>, Zenin <zenin@best.com> wrote:
>Andrew M. Langmead <aml@world.std.com> wrote:
> >snip<
>: The statement "goto LABEL" has its uses (maybe less so than in other
>: languages, but there are uses.)
>
> Show me one, please. So far I've yet to see a valid use that
> was not brought about by bad or no design. If there is a valid
> case for it that is not used to fix other code that should have
> been done differently anyway, I'd like to know what it is.
Rather than be a slave to goto dogmas, I've found the following methodology
for handling error recovery simpler, more straight forward and easier to
maintain than the alternative of failure switches and complex if/leave/etc
nestings:
sub Fail {
my $msg= "$0: ".(my $em=shift)."\n";
my %opt= @_;
local $_;
($_=$opt{Resume})
? ( (warn $msg),
('CODE' eq ref $_)?$_->($em):(goto $_))
: die $msg;
}
while(...) {
...
open IFA,$whatever or Fail "open $whatever: $!", Resume=> sub{next};
open IFB,$wherever or Fail "open $wherever: $!", Resume=>'KEEP_GOING';
...
KEEP_GOING:
close IFA;
}
I would hate to lose a tool a useful as the very sparing use of goto because
of the religious fanaticism of the anti-goto camp.
--
O- J. Anthony Fitzgerald, jaf@UNB.ca, http://www.unb.ca/csd/staff/jaf/ -O
------------------------------
Date: Wed, 11 Mar 1998 10:50:36 GMT
From: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: Problem with filenames on NT
Message-Id: <ebohlmanEpnI4C.KGq@netcom.com>
Miran Sepic <miran.sepic4@mss.tel.hr> wrote:
: I have a following problem. I made a CGI script that reads files from
: one directory, and puts the list of links to them on a web page. Perl
: reads the directory, and everything is OK except one. In the directory
: there are some files with characters: #, $, %. They are shown on the
: list but link to them doesn't work. Microsoft IIS server says: File Not
: Found. I think the reason is HTTP, but I must use filenames with such
: characters. Is there an idea how I can do it?
What you need to remember is that a URL and a filename are two distinct
things, even though an HTTP server may very well map one to the other
literally. The characters you mentioned are indeed illegal in URLs.
However, HTTP provides an "escape" mechanism, called URL-encoding, for
including representations of such characters in a URL. And fortunately,
some very experienced Perl programmers wrote a module called URI::Escape
that will do this encoding for you. Go over to CPAN and get it if you
don't already have it (which you will if you have LWP).
------------------------------
Date: Tue, 10 Mar 1998 10:49:35 -0800
From: Christopher Heiser <hyperion@ideo.com>
To: gwasson@ideo.com
Subject: test message: please ignore
Message-Id: <35058B3F.B46D760D@ideo.com>
-
this is a message to test response time for our news feed.
please ignore.
-ch
------------------------------
Date: Mon, 09 Mar 1998 22:54:38 -0500
From: Tim Darling <#tdarling@glue.umd.edu#>
Subject: Why doesn't ' s/\(/#LPAREN#/gi; ' work? !!
Message-Id: <6e2ddl$jtg$1@hecate.umd.edu>
I'm trying to search $_ for every occurence of the ASCII char "(" and
replace it with #LPAREN#, but I can't figure out how!! Does anyone have
any ideas??
s/\(/#LPAREN#/gi; <--- this doesn't work
Thanks greatly, -Tim
(ps. please cc me a copy, removing the # from my email address)
------------------------------
Date: 11 Mar 1998 14:19:21 +0100
From: Casper Kvan Clausen <ckc@dmi.dk>
To: Tim Darling <tdarling@glue.umd.edu>
Subject: Re: Why doesn't ' s/\(/#LPAREN#/gi; ' work? !!
Message-Id: <wvphg55jrfq.fsf@pratt.ejoper.dmi.min.dk>
Tim Darling <#tdarling@glue.umd.edu#> writes:
[CC'ed to author]
> I'm trying to search $_ for every occurence of the ASCII char "(" and
> replace it with #LPAREN#, but I can't figure out how!! Does anyone have
> any ideas??
>
> s/\(/#LPAREN#/gi; <--- this doesn't work
Huh?
I tried this:
#!/usr/local/bin/perl -w
$text = "fun()";
print "Before:\t$text\n";
$text=~s/\(/#LPAREN#/gi;
print "After:\t$text\n";
What happened was this:
ckc@pratt:~> perl darling.pl
Before: fun()
After: fun#LPAREN#)
ckc@pratt:~> perl -v
This is perl, version 5.004_04 built for sun4-solaris
:
:
So I'm afraid I fail to see the problem. Perhaps if you were to post
some more specifics about _how_ it fails to work, we could help.
Kvan.
--
-------Casper Kvan Clausen------ | 'Ah, Warmark, everything that passes
----------<ckc@dmi.dk>---------- | unattempted is impossible.'
Lokal 544 |
I do not speak for DMI, just me. | - Lord Mhoram, Son of Variol.
------------------------------
Date: Wed, 11 Mar 1998 07:26:03 -0600
From: culrich@i2000.net
Subject: Re: Wierd redirection problem with Location:
Message-Id: <6e63as$cok$1@nnrp1.dejanews.com>
efflandt@xnet.com (David Efflandt) wrote:
>
> culrich@i2000.net wrote:
>
> >print "Content-type: text/html\n";
> >print "Location: http://www.some-other-domain.com/page2.htm\n\n";
> >
> >All that it does is display a hyperlink on the screen to
> >http://www.some-other-domain.com/page2.htm
> >
> >Any ideas why it is printing a link rather than loading the content of that
> >page (which does have content)? Thanks in advance.
> >
> >- Chris
> > culrich @ i2000.net
>
> This has absolutely nothing to do with perl. But like computers in
> general, it is simply doing what you are telling it to do, print html.
> If you want to redirect, try removing the "Content-type:..." line.
>
> David Efflandt/Elgin, IL USA
> efflandt@xnet.com http://www.xnet.com/~efflandt/
>
The combination
print "Content-type: text/html\n";
print "Location: /page1.htm\n\n";
is successfully used to redirect to a page on your own server. This is how
you tell Perl to do it, and it works perfectly, as described in many Perl
manuals. The problem I am having is when I indicate a full URL in the
location line, which the manuals also say is supported. When I print:
print "Content-type: text/html\n";
print "Location: http://www.xyz.com/page1.htm\n\n";
It merely puts a hyperlink on the screen. It should do redirection to the
full URL. Instead, it puts a hyperlink on the screen. Is this a Perl issue?
Solaris? Configuration of Solaris? Thanks in avance.
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading
------------------------------
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 2070
**************************************