[7473] in Perl-Users-Digest
Perl-Users Digest, Issue: 1099 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Sep 29 17:28:04 1997
Date: Mon, 29 Sep 97 14:00:21 -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 Mon, 29 Sep 1997 Volume: 8 Number: 1099
Today's topics:
Re: [Q] Append to last line in file? thalerj_NOSPAM@wwa._NOSPAM.com
getting file fro ma remote computer ? <nakadina@ibm.net>
Re: getting file fro ma remote computer ? (brian d foy)
Help with system() <RonYak@mindspring.com>
Re: How can I make sure programs run by perl die when m <rootbeer@teleport.com>
Re: Let Perl load a HTML page <tou@tou.com>
Makefile out of date... (Ken Williams)
Re: Many CGI/PERL forms don't work with Lynx? <rootbeer@teleport.com>
Re: Memory fails me (Ken Williams)
Re: New Perl syntax idea (Martin Schwartz)
Re: New Perl syntax idea (brian d foy)
NEWS LETTER III <ASMAsoft@svtus.com>
On-line perl manual? (Audrey Le)
Re: On-line perl manual? (brian d foy)
perl-mvs-escape sequence.... <k3dk@maristb.marist.edu>
Re: Reading each word from a file (Scott McMahan)
Re: Reading each word from a file (Tom Grydeland)
ROUNDING real numbers in perl ben_feist@ideaguys.com
Re: ROUNDING real numbers in perl (brian d foy)
Re: ROUNDING real numbers in perl <yash@teczar.com>
Software Consultants Required, (Power Builder, VC++, VB <ASMAsoft@svtus.com>
Re: week-of-the-year calculation <rootbeer@teleport.com>
Re: write question ? (Tom Grydeland)
Re: write question ? (Tom Grydeland)
Re: write question ? (Brandon S. Allbery KF8NH; to reply, change "void" to "kf8nh")
Re: write question ? (Charles DeRykus)
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 29 Sep 1997 14:19:23 -0500
From: thalerj_NOSPAM@wwa._NOSPAM.com
Subject: Re: [Q] Append to last line in file?
Message-Id: <60ouvr$77v@miso.wwa.com>
Jeff Stampes (stampes@xilinx.com) wrote:
> thalerj_NOSPAM@wwa._NOSPAM.com wrote:
> > Currently I'm attempting the following:
> > open FP, "+>>$filename" or die $!;
> > seek FP, 0, 0;
> > print FP, " $newtext";
> > close FP;
> >
> > But it's still printing the newtext on a new line at the end.
>
> I doubt it.
It's true.
> Do you realize that with that seek statement, you are setting
> the file pointer to the BEGINNING of the file?
Actually yes, I do realize that. I must apologize for not being clearer
in my original post. I had tried all of the following:
seek FP, 0, 2;
seek FP -1, 2;
seek FP -10, 2;
seek FP 0, 0;
All of these seemed to give me the same result: adding a new line to
the end of the file. This leads me to believe that seek will not set
the file pointer when the file is open for appending.
I will just go ahead with the method of reading in everything and
spitting it back out again. However, I am curious why seek is not
doing what I'd expect it to do in this case.
Thanks for your help,
-Jay Thaler
------------------------------
Date: Mon, 29 Sep 1997 20:57:32 +0200
From: "Gal Samuel" <nakadina@ibm.net>
Subject: getting file fro ma remote computer ?
Message-Id: <342ffade.0@news1.ibm.net>
Hello ,
Can someone suggest a good way to open a file for further handling from an
Internet URL ?
program should:
1. read the remote file. (let's say from http://www.xxxx.com/)
2. store it localy.
3. set variables from the file's data.
4. calculate function with these variables.
5. printout the calculations.
I'm most intrested in an answer to line 1 of the program; the rest I'm
fimiliar with.
Thanks for your time.
Gal Samuel
mailto:nakadina@ibm.net
------------------------------
Date: Mon, 29 Sep 1997 16:53:20 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: getting file fro ma remote computer ?
Message-Id: <comdog-ya02408000R2909971653200001@news.panix.com>
In article <342ffade.0@news1.ibm.net>, "Gal Samuel" <nakadina@ibm.net> wrote:
>Can someone suggest a good way to open a file for further handling from an
>Internet URL ?
use the LWP family of modules [1]. LWP.pm comes with plenty of examples
of doing exactly what you are trying to do.
good luck :)
[1]
Comprehensive Perl Archive Network
find one near you at <URL:http://www.perl.com>
--
brian d foy <comdog@computerdog.com>
NY.pm - New York Perl M((o|u)ngers|aniacs)* <URL:http://ny.pm.org/>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
------------------------------
Date: Mon, 29 Sep 1997 15:34:23 -0400
From: "Ron Yacketta" <RonYak@mindspring.com>
Subject: Help with system()
Message-Id: <60ovra$iv1@camel15.mindspring.com>
I have the following piece of code that works fine, except that I get
unwanted output from the command being issued from inside the system(). I
would like to have the command inside the system() execute without any
output to STDOUT/STDERR.
eval {$do = system '/etc/vgcfgbackup', "/dev/$_"};
if ( $do ne 0 )
{
warn "\n\tFatal error!!\n\tContact the System Administrator\n\n";
}
the vgcfgbackup command spits out info to the STDOUT and or STDERR depending
on its success/failure. I would like to run the vgcfgbackup command with NO
output to STDOUT/STDERR and use the if() to notify the user of success or
failure.
Thanxs in advance for your help!!!
------------------------------
Date: Mon, 29 Sep 1997 13:50:35 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Jong <jong@mrc-lmb.cam.ac.uk>
Subject: Re: How can I make sure programs run by perl die when my perl dies?
Message-Id: <Pine.GSO.3.96.970929133124.12373L-100000@usertest.teleport.com>
On Mon, 29 Sep 1997, Jong wrote:
> I notice that a program which I run within perl scripts (using backtick
> or system command) still runs on even though perl died.
Yes and no. Normally, when you run something using system or backticks,
perl waits for that process to finish before it goes on. If your script
later dies, the processes started earlier have all quit, so all is well.
But there are two other cases to consider. One is that your script is
somehow terminated during the execution of the other process. For example,
try this script.
perl -e 'system "kill $$; sleep 2; echo okay"'
If a signal comes in while perl is running a command via system or
backticks, there's nothing you can reliably do (AFAIK) to terminate the
generated process. (There's no portable and reliable way to distinguish
the processes started by Perl from anything else that you may want to keep
running, even if you can catch the signal.)
The other case is when the process you start starts another process which
keeps running. If that happens, again, there's no portable and reliable
way (in general) to distinguish these processes from any others you're
running.
> Is there any elegant way to make sure all the programs run by perl
> killed immediately when perl program is killed?
If you've got the pids of the processes you want to kill, you can try
something like this.
# Propagate signals
$SIG{INT} = $SIG{HUP} =
sub { kill $_[0], @pids; exit };
Getting that list of pids is left as an exercise. :-) Good luck!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: Mon, 29 Sep 1997 11:01:54 -0700
From: Joel Shellman <tou@tou.com>
To: "b. boertjes" <boertjes@worldaccess.nl>
Subject: Re: Let Perl load a HTML page
Message-Id: <342FED12.63AC461D@tou.com>
> In the script I would like Perl to load a new page (normal HTMLpage)
> at the end of the script.
> So not how to generate a page by the script, I know that already,
> but I cannot find the command to simple load a .html file after my script
> has done its job.
>
> Bram Boertjes
> The Netherlands
I think what you're getting at is that you want to put a:
print "Location: http://www.somedomain.com/someurl/whatever.htm\n\n"
At the end of the script so it will go to that page after the script finishes.
Is that is?
Good luck,
Joel Shellman
--
TaoTree Research and Development
Web Development/Design, Virtual Servers, hosting, Perl/CGI programming
http://www.tou.com/rd/
Revolutionary new clicks-based Banner Exchange Guarantees you traffic
http://www.tou.com/ite/
------------------------------
Date: Mon, 29 Sep 1997 16:16:52 -0400
From: ken@forum.swarthmore.edu (Ken Williams)
Subject: Makefile out of date...
Message-Id: <ken-2909971616520001@news.swarthmore.edu>
Hi-
I'm unsuccessfully trying to build sfio into Perl 5.004_01. Here's one of
the errors I get:
Making IO (dynamic)
Makefile out-of-date with respect to ../../lib/Config.pm ../../config.h
Cleaning current config before rebuilding Makefile...
make -f Makefile.old clean > /dev/null 2>&1 || /bin/sh -c true
../../miniperl "-I../../lib" "-I../../lib" Makefile.PL "INSTALLDIRS=perl"
"LIBPERL_A=libperl.a"
Writing Makefile for IO
==> Your Makefile has been rebuilt. <==
==> Please rerun the make command. <==
false
*** Exit 1
Stop.
/usr/bin/make config failed, continuing anyway...
../../miniperl -I../../lib -I../../lib ../../lib/ExtUtils/xsubpp
-noprototypes -typemap ../../lib/ExtUtils/typemap IO.xs
>IO.tc && mv IO.tc IO.c
cc -c -DSTANDARD_C -I/usr/local/include/db
-I/usr/local/src/sfio97/include -O4 -DVERSION=\"1.1504\"
-DXS_VERSION=\
"1.15\" -I../.. IO.c
Running Mkbootstrap for IO ()
chmod 644 IO.bs
ar cr tmp.a IO.o
: tmp.a
LD_RUN_PATH="" ld -o ../../lib/auto/IO/IO.so -shared -expect_unresolved
"*" -O4 -msym -s -L/usr/local/lib -L/usr/local/
src/sfio97/lib -all tmp.a -none
chmod 755 ../../lib/auto/IO/IO.so
cp IO.bs ../../lib/auto/IO/IO.bs
chmod 644 ../../lib/auto/IO/IO.bs
I get similar errors for every module that's supposed to be dynamically linked.
Rerunning the make command doesn't help. This make actually produces an
executable, but it doesn't have sfio in it.
I've seen this problem posted before and the problem was that the guy's
machine's clock was a year off! This is not what's happening on my
system. Also, the makefile is fresh, it was just created by Configure.
I'll be grateful for some enlightenment.
-Ken Williams
The Math Forum
ken@forum.swarthmore.edu
------------------------------
Date: Mon, 29 Sep 1997 13:11:28 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Patrick Kellum <patrick@syix.com>
Subject: Re: Many CGI/PERL forms don't work with Lynx?
Message-Id: <Pine.GSO.3.96.970929115004.12373I-100000@usertest.teleport.com>
On 29 Sep 1997, Patrick Kellum wrote:
> Could Lynx be sending the form data back wrong?
Maybe it's misinstalled on your system. To check, set up your favorite
form (or a copy of it) to use this script as its action, and see what you
get. Try it with any browser you wish, of course.
http://www.teleport.com/cgi-bin/custom/rootbeer/form-vars
ObPerl: The script gives you its source upon request, so you can install
it on your own machine. Enjoy!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: Mon, 29 Sep 1997 14:52:13 -0400
From: ken@forum.swarthmore.edu (Ken Williams)
Subject: Re: Memory fails me
Message-Id: <ken-2909971452130001@news.swarthmore.edu>
Did you mean "how do I pick out the character 'n' from a string?"? In
that case, you'll want to check out the index() function.
In article <60gkol$hhm$1@plug.news.pipex.net>, "Rufus"
<rste@greencathedral.com> wrote:
>How do I pick out character n of a string of length N?
>
>I can clearly do this using substr, but I am sure that once I could clearly
>do it the right way. It is a long time since I have used perl, and I have
>been corrupted by other languages to the point where I can never remember
>which syntax is which. Normally this is not a problem, but the manual does
>not seem to want to answer this question.
>
>substr works, but will be slow, and I am sure is not the way I did it
>before. Please someone, remind me...
>
>Thanks,
>
>Rufus rste@greencathedral.com
>
>The opinions expressed in this email match those of my company only where
>those of my company happen through chance to match those in the email.
-Ken Williams
The Math Forum
ken@forum.swarthmore.edu
------------------------------
Date: 29 Sep 1997 19:24:05 GMT
From: schwartz@cs.tu-berlin.de (Martin Schwartz)
Subject: Re: New Perl syntax idea
Message-Id: <60ov8l$afi$1@news.cs.tu-berlin.de>
Greg Bacon (gbacon@adtran.com) wrote:
>> How about aliasing 'method' to 'sub' and passing the object reference
>> through a magic variable when 'method' is used?
> What potential benefits do you see for such an addition?
C++ feeling?
:-), Martin
--
// Le degre zero de l'ecriture? Zero probleme!
------------------------------
Date: Mon, 29 Sep 1997 16:38:17 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: New Perl syntax idea
Message-Id: <comdog-ya02408000R2909971638170001@news.panix.com>
In article <342FE73B.41C2@ixlabs.com>, chris@ixlabs.com wrote:
>I haven't spent 2 minutes thinking about the pros and cons of this but -
>hey, I'll throw it out there.
maybe there should be comp.lang.perl.babble for people who don't
think before they speak?
>How about aliasing 'method' to 'sub' and passing the object reference
>through a magic variable when 'method' is used?
and what happens if i have more than one object of the same class?
--
brian d foy <comdog@computerdog.com>
NY.pm - New York Perl M((o|u)ngers|aniacs)* <URL:http://ny.pm.org/>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
------------------------------
Date: Mon, 29 Sep 1997 15:06:23 -0400
From: ASMAsoft <ASMAsoft@svtus.com>
Subject: NEWS LETTER III
Message-Id: <uQzaIrQz8GA.105@nih2naac.prod2.compuserve.com>
ASMAsoft, Inc.
(Formerly Silicon Valley Technology Consultants)
News Letter 9709-III
Foreword
Continuing the trend this News Letter, brings a bag mixed of company
news, bonus schemes and major industry news to you. We
strongly encourage you to actively participate in this program and send us
feedback and suggestions.
News
To reflect greater emphasis on SOFTWARE, effective 25th September 1997,
Silicon Valley Technology Consultants has changed its name
to ASMAsoft, Inc. There is no change in the management or operations
other than the change of name to ASMAsoft, Inc. Starting this
week and all subsequent weeks, News Letters will be released under the
name of ASMAsoft, Inc.
Sudha Chelliah, has joined Lucent Technologies, New Jersey.
Enterprise Solution
CyberDesk coupled with CyberFrame offers a powerful enterprise solution
to manage, deliver and display, Multimedia enriched
information over Internet and Intranet. Where CyberDesk delivers the
information over the Net, CyberFrame provides the flexibility to
store, retrieve and manage multimedia objects (audio, video, graphics, text
etc...) in the distributed and disparate database. CyberFrame
enables the existing enterprise database to handle diverse multimedia
formats. As an example, Assembly CyberDesk in a typical
Production Floor, can retrieve and display multimedia enriched assembly
instructions. CyberFrame as a stand alone solution can be used
to publish Multimedia Training Manuals on the Internet/Intranet.
Business News
REACH OUT CONSULTANTS PROGRAM
The response to "Reach Out Consultants Program" is encouraging, we need
your support, please reach out to your personal networks to
refer consultants to ASMAsoft and get $1200* as a referral bonus. In addition
get One Return Air Ticket to India for every 5 consultants
who join us on your referral, and One Return Air Ticket to India plus $1500
if you refer 10 consultants. This could be very useful if you
are planning a trip to visit your family during Christmas Break.
Remember, "Reach Out Consultants Program" expires on December 31st
1997. E-mail resumes to resume@svtus.com
*$1200 referral bonus is paid as $100 per month over active 12 project
months, after a referred consultant has joined the ASMAsoft.
GET YOUR PERSONAL WEB SITE SPACE
Now, ASMAsoft consultants can publish their Web Pages on ASMAsoft's
2,000,000 hits Web Site, and it is absolutely FREE!!!
Design your HTML pages and send them to Mohit Gupta along with the
directory name. Your personal Web address will become
www.svtus.com/directory name.
Internet News
Of all the ways your company can put Internet technology to work, one
stands out with proven return on investment. Web specialist
Annette Hamilton brings you recent research that documents the
bottom-line benefits of corporate intranet.
For detailed story visit :
http://www4.zdnet.com/chkpt/adt0922ww/www.anchordesk.com/story/story_
1260.html
Please send your feed back to
Adarsh Katyal
(Director Business Development)
E-mail : adarsh@svtus.com
ASMAsoft, Inc.
21427, Continental Circle
Saratoga, CA 95070, USA
------------------------------
Date: 29 Sep 1997 19:27:41 GMT
From: anl1@ee.msstate.edu (Audrey Le)
Subject: On-line perl manual?
Message-Id: <60ovfd$nsp$1@NNTP.MsState.Edu>
Hi,
Does anyone know of a good (complete) on-line reference/manual for perl?
Email me the links. My email is anl1@ee.msstate.edu
Thank you for your help.
-Audrey
------------------------------
Date: Mon, 29 Sep 1997 16:49:54 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: On-line perl manual?
Message-Id: <comdog-ya02408000R2909971649540001@news.panix.com>
In article <60ovfd$nsp$1@NNTP.MsState.Edu>, anl1@EE.MsState.Edu wrote:
>Does anyone know of a good (complete) on-line reference/manual for perl?
<URL:http://www.perl.com/>
>Email me the links.
this isn't the homework hotline. feel free to participate, but not
to leech.
--
brian d foy <comdog@computerdog.com>
NY.pm - New York Perl M((o|u)ngers|aniacs)* <URL:http://ny.pm.org/>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
------------------------------
Date: Mon, 29 Sep 1997 08:47:32 -0400
From: Vasanth Shenoy <k3dk@maristb.marist.edu>
Subject: perl-mvs-escape sequence....
Message-Id: <342FA364.5B4B@maristb.marist.edu>
Hi all,
I have script that gets some input from a form and does something
with the input(sends a mail). The script runs perfectly in Linux.
But when I try to use it in MVS/OS-390, it just does not work.
I know why it does not work! it does not work because we have to
interpret the escape sequenced letters properly. eg: : / , ~ ( ) etc.
The code that works on a linux doesn't seem to be working on MVS.
Can someone help please ?
Thanx
-Vasanth
------------------------------
Date: 29 Sep 1997 18:44:40 GMT
From: scott@lighthouse.softbase.com (Scott McMahan)
Subject: Re: Reading each word from a file
Message-Id: <60osuo$u6a$4@mainsrv.main.nc.us>
Nadeem Rana (nrana@aludra.usc.edu) wrote:
: Word1: the meaning is here
: can be multiple lines meanings...
: Word2: meaning of this word goes here (might have 3 or 4 lines meaning)
This is good, old-fashioned control-break logic, just like your
grandfather used to write in COBOL.
The general logic is:
read a line that begins a new group of lines (ie, skip file
headers and stuff)
continue reading lines and storing them in a buffer somewhere
(push is handy for this) ...
... until the next line you read begins a new group of lines
When you hit a new group, process the old group and delete the
temporary data. Then begin storing the temporary data all over
again with the new line, and repeat until EOF
The tricky part is you have to store an entire line in temporary memory
somewhere until you have assembled an entire group of lines together,
then you have to juggle the next group's starting line until you
process the temporary info, and then start the temporary info all over
again with the new group's line. You can't misplace the new group's
initial line in all this.
Obviously, you could have multiple levels of control-break logic (what
if medical terms, dental terms, and a glossary of medical equipment
were all in the same file?), and it can get complex.
If there's some sort of delimiter, like newline separated
groups of lines, the logic is easier because you don't have
to juggle the boundary condition, you can just throw it away.
Scott
------------------------------
Date: 29 Sep 1997 18:56:08 GMT
From: Tom.Grydeland@phys.uit.no (Tom Grydeland)
Subject: Re: Reading each word from a file
Message-Id: <slrn62vue8.126.Tom.Grydeland@mitra.phys.uit.no>
On 29 Sep 1997 10:30:53 -0700,
Nadeem Rana <nrana@aludra.usc.edu> wrote:
> I have a file with meanings of medical temrs and the syntax is like
> this
>
> Word1: the meaning is here
> can be multiple lines meanings...
>
> Word2: meaning of this word goes here (might have 3 or 4 lines meaning)
What you're calling "words" here would usually be called *records*, where
each record has two *fields*, the word and its meaning.
If you always have blank lines between the different words, the
following is a start:
#!/store/bin/perl -w
# Always, always remember to use -w
$/=""; # Read multiline records, separated by blank lines
while (<>) {
($word, $meaning) = split /:/;
# Now you have to open a file and print to it
# Look for open and print in your helpful documentation
print "word: $word\n";
print "meaning: $meaning\n------\n";
}
> What i need to do is to generate a separate file for each word and the
> name of the file will be the word and the contents of that file will be
> its meaning. So if i have 100 words then there will be 100 files as a
> result.
Feed your dictionary to the finished version, and you're done!
> Thanks
You're welcome.
> Nadeem
--
//Tom Grydeland <Tom.Grydeland@phys.uit.no>
------------------------------
Date: Mon, 29 Sep 1997 16:36:17 GMT
From: ben_feist@ideaguys.com
Subject: ROUNDING real numbers in perl
Message-Id: <342fd85a.247000698@news.medius.com>
I've been looking for hours on the internet to find a resource that
will tell me how to round a number in perl. I can't believe that I
would have to root through MAN pages looking for the hidden function
that I KNOW wouldn't be called "round" or anything intuitive like
that.
Could someone please post the command to round an integer. There
doesn't seem to even be a truncate function.
If anyone knows of a half decent online perl reference guide, please
post the url.
End of rant.
Ben Feist
------------------------------
Date: Mon, 29 Sep 1997 16:47:31 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: ROUNDING real numbers in perl
Message-Id: <comdog-ya02408000R2909971647310001@news.panix.com>
In article <342fd85a.247000698@news.medius.com>, ben_feist@ideaguys.com wrote:
>I've been looking for hours on the internet to find a resource that
>will tell me how to round a number in perl. I can't believe that I
>would have to root through MAN pages looking for the hidden function
>that I KNOW wouldn't be called "round" or anything intuitive like
>that.
had you read the FAQ [1], you would have saved yourself hours. the
answer to your question comes with perl's bundled documentation.
>Could someone please post the command to round an integer. There
>doesn't seem to even be a truncate function.
see <URL:http://www.perl.com/CPAN-local/doc/manual/html/pod/
perlfaq4/Does_perl_have_a_round_function_.html>
>If anyone knows of a half decent online perl reference guide, please
>post the url.
i know a fully decent one [1], no need to settle for inferiority.
[1] doesn't get any easier than this:
<URL:http://www.perl.com>
--
brian d foy <comdog@computerdog.com>
NY.pm - New York Perl M((o|u)ngers|aniacs)* <URL:http://ny.pm.org/>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
------------------------------
Date: Mon, 29 Sep 1997 16:45:05 -0400
From: Yash Khemani <yash@teczar.com>
To: ben_feist@ideaguys.com
Subject: Re: ROUNDING real numbers in perl
Message-Id: <34301351.4BF5E104@teczar.com>
for example:
say n is the number of places to round to - here, we say n=3.
my $a = 1.3095;
my $b = sprintf("%.3f",$a);
^
n
print "$b\n";
should produce as output:
1.310
cheers!
yash
ben_feist@ideaguys.com wrote:
>
> I've been looking for hours on the internet to find a resource that
> will tell me how to round a number in perl. I can't believe that I
> would have to root through MAN pages looking for the hidden function
> that I KNOW wouldn't be called "round" or anything intuitive like
> that.
>
> Could someone please post the command to round an integer. There
> doesn't seem to even be a truncate function.
>
> If anyone knows of a half decent online perl reference guide, please
> post the url.
>
> End of rant.
>
> Ben Feist
------------------------------
Date: Mon, 29 Sep 1997 15:05:29 -0400
From: ASMAsoft <ASMAsoft@svtus.com>
Subject: Software Consultants Required, (Power Builder, VC++, VB, ActiveX)
Message-Id: <ODx#nqQz8GA.287@nih2naac.prod2.compuserve.com>
ASMAsoft is currently looking for Software Professionals to fill out
Immediate Short Term Contracts with following Skills
Job Code : IX-0001
Location : Folsom, California
Project : IT Focumentation Library
Project Duration : 4 months
Consultant will serve as a senior programmer/analyst and will be a major
contriobutor to the design. development and implementation of the new
system. Additionally, enhancements and support to the current system will
also be expected.
Skills Required
Client Server : Experience developing, implementing and supporting C/S
application (senior skill level)
Database experience with relational database a must, Microsoft SQL Server
Preferred. (Senior Skill level)
Client Experience in PowerBuilder, Visual Basic, or C++ (senior skill level)
Understanding of Microsoft ActiveX/Com, ASP and ADO technologies
Web : Must be well versed in Web development including setup and
maintenance of Webservers, HTML, Java and Javascript (Senior Skill Level)
Excellent Verbal and Written Communication skills.
Additional Skills Desired : ActiveX, other Web Development Tools
Experience
ASMAsoft, Inc.
1435McCandless Drive
Milpitas, CA 95035
Tel : (408) 934 8444 x 8223
Fax: (408) 934 8459
ASMAsoft, Inc.
21427, Continental Circle
Saratoga, CA 95070, USA
------------------------------
Date: Mon, 29 Sep 1997 13:54:28 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Fridiric GILLES <gilles@tls-cats.sps.mot.com>
Subject: Re: week-of-the-year calculation
Message-Id: <Pine.GSO.3.96.970929135320.12373M-100000@usertest.teleport.com>
On Mon, 29 Sep 1997, Fr=E9d=E9ric GILLES wrote:
> Thank you very much! I'm going to use your module.
> But is it Year2000 compliant?=20
If the module's documentation doesn't tell you this, it should.
> Can you provide some tests to prove the compliance?=20
If the module doesn't come with tests which prove this, you should write
some and send a patch to the author. :-)
--=20
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: 29 Sep 1997 19:06:45 GMT
From: Tom.Grydeland@phys.uit.no (Tom Grydeland)
Subject: Re: write question ?
Message-Id: <slrn62vv25.126.Tom.Grydeland@mitra.phys.uit.no>
On Mon, 29 Sep 1997 11:15:07 -0500,
Doug Simon <simondr@cig.mot.com> wrote:
> However, my problem is that I can not get STDOUT back to normal!!!
> I have tried almost everything.
You're asking the wrong question. What you want is not to redirect
STDOUT and then get it back, but to send your writes to a different
filehandle.
Take one more look at the perlform manpage, and you could even try to
search for the word "select" in it.
> 2) Is there an easier way to get the output of write into a variable?
This is also covered in the perlform manpage.
> Thanks,
You're welcome.
> Doug Simon
--
//Tom Grydeland <Tom.Grydeland@phys.uit.no>
------------------------------
Date: 29 Sep 1997 19:14:39 GMT
From: Tom.Grydeland@phys.uit.no (Tom Grydeland)
Subject: Re: write question ?
Message-Id: <slrn62vvgv.126.Tom.Grydeland@mitra.phys.uit.no>
On Mon, 29 Sep 1997 11:15:07 -0500,
Doug Simon <simondr@cig.mot.com> wrote:
> 1) How can I get STDOUT back
In my previous followup, I was too preoccupied with answering this
question to emphasize what I'm going to say now:
> 2) Is there an easier way to get the output of write into a variable?
Yes, there is. It's even supplied as an example in the perlform
manpage, which should be the obvious place to look for information if
you're stuck while using formats.
You *did* check the perlform manpage, didn't you?
> Thanks,
Again, you're welcome.
> Doug Simon
--
//Tom Grydeland <Tom.Grydeland@phys.uit.no>
------------------------------
Date: Mon, 29 Sep 97 16:08:45 -0400
From: bsa@void.apk.net (Brandon S. Allbery KF8NH; to reply, change "void" to "kf8nh")
Subject: Re: write question ?
Message-Id: <34300cde$1$ofn$mr2ice@speaker>
In <342FD40A.41C67EA6@cig.mot.com>, on 09/29/97 at 11,
Doug Simon <simondr@cig.mot.com> said:
+-----
| 2) Is there an easier way to get the output of write into a variable?
+--->8
Check out perlform.pod, with special attention to "formline".
--
brandon s. allbery [Team OS/2][Linux] bsa@void.apk.net
cleveland, ohio mr/2 ice's "rfc guru" :-) KF8NH
Warpstock '97: OS/2 for the rest of us! http://www.warpstock.org
Memo to MLS: End The Burn Scam --- Doug Logan MUST GO! FORZA CREW!
------------------------------
Date: Mon, 29 Sep 1997 18:54:53 GMT
From: ced@bcstec.ca.boeing.com (Charles DeRykus)
Subject: Re: write question ?
Message-Id: <EHA9vH.1E2@bcstec.ca.boeing.com>
In article <342FD40A.41C67EA6@cig.mot.com>,
Doug Simon <simondr@cig.mot.com> wrote:
> I am trying to capture the output of :
>
> write;
>
> Into a variable.
>
> I have been successful by redirecting STDOUT to a file,
> and then reading the file into a variable.
>
> open(STDOUT,">$foo");
> write;
>
> However, my problem is that I can not get STDOUT back to normal!!!
> I have tried almost everything.
>
> 1) How can I get STDOUT back
>
> or
>
> 2) Is there an easier way to get the output of write into a variable?
>
>
Use the formline call (see page 127 in the "Blue Camel" for an example
of its use).
HTH,
--
Charles DeRykus
------------------------------
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 1099
**************************************