[8530] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 2147 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Mar 20 18:07:23 1998

Date: Fri, 20 Mar 98 15:00:33 -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           Fri, 20 Mar 1998     Volume: 8 Number: 2147

Today's topics:
    Re: Are There Any Snazzy Perl Editors for Windows? <Rosie@dozyrosy.demon.co.uk>
    Re: ARRRG! "recommended" CPAN update stopped CPAN modul (Michael J Gebis)
        Can PERL run in the background? <webmaster@netminder.com>
    Re: Can PERL run in the background? (Mike Stok)
    Re: chdir in win32 (Craig Berry)
    Re: contexts: is there such a thing as array? (Mark-Jason Dominus)
    Re: Cross Platform usage of DBM database <zenin@archive.rhps.org>
        DBM files... <Bill.Lewis@mci.com>
    Re: Document contains no data (Andrew M. Langmead)
    Re: Evaluate expression inside print "" <c..bojswbo@87.usenet.us.com>
    Re: Evaluate expression inside print "" <jstern@world.northgrum.com>
        HELP ME PLEASE!!! <cpryor@texhoma.net>
    Re: HELP ME PLEASE!!! (Craig Berry)
        help needed with grep type function for perl script. ( Mark Kucera)
        IO version mismatch abort <walts@nortel.ca>
    Re: ls -l to an array and pull 3 columns on data (Abigail)
    Re: ls -l to an array and pull 3 columns on data (Jason Gloudon)
        Math and ffround julie.rudolph@teldta.com
        ODBC datasources! <browns1@borg.com>
        Perl-> MS-Access <sastry_varanasi@tandem.com>
    Re: Question about DBM Array (Jason Gloudon)
        Redirecting output sflorcsk@email.aphis.usda.gov
    Re: sending mail through perl ( Mark Kucera)
    Re: Stinking lousy $*(@#*$@ cmd lin args-HELP (Phil Hanna)
        SybPerl for NT 4.0? (Robert Rizzo)
    Re: Using perl code as a config file syntax? (Or, can r <zenin@archive.rhps.org>
    Re: Using perl code as a config file syntax? (Or, can r <zenin@archive.rhps.org>
    Re: Using perl code as a config file syntax? (Or, can r <zenin@archive.rhps.org>
    Re: Using perl code as a config file syntax? (Or, can r <zenin@archive.rhps.org>
    Re: Wanted: email address gleaner (John Stanley)
    Re: what is wrong with being a novice ?? tim@maroney.org
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Thu, 19 Mar 1998 22:08:21 +0000
From: Rosemary I H Powell <Rosie@dozyrosy.demon.co.uk>
Subject: Re: Are There Any Snazzy Perl Editors for Windows?
Message-Id: <26wd6FAVdZE1Ew4K@dozyrosy.demon.co.uk>

In article <McdXUXAiH7D1EwkA@consultancy-services.com>, Alan Silver
<alan@consultancy-services.ferret.com> writes
>Alan Schwartz <alansz@araw.mede.uic.edu> wrote ...
>>I also love PFE. When using it with Perl, a handy thing is to tell
>>it that the "compile" command is "perl -cw". You can then 
>>hit compile and watch another window pop up containing all your warnings,
>>etc., so you can fix up the code.
>
>Sounds good, where do we get it ?
>
>Alan
>
>From another Alan :-)

Alan Phillips    email   :  A.Phillips@lancaster.ac.uk 
                 web page:  http://www.lancs.ac.uk/people/cpaap/pfe

Rosemary
(just another satisfied customer)
-------------------------------------------------------------------
| Rosemary I.H.Powell  EMail: Home: rosemary@dozyrosy.demon.co.uk |     
|                             Work: r.i.h.powell@rl.ac.uk         |
|                       http://www.netlink.co.uk/users/dozyrosy/  |
|                       http://www.dozyrosy.demon.co.uk/          | 
-------------------------------------------------------------------


------------------------------

Date: 20 Mar 1998 21:27:15 GMT
From: gebis@albrecht.ecn.purdue.edu (Michael J Gebis)
Subject: Re: ARRRG! "recommended" CPAN update stopped CPAN module from working!
Message-Id: <6eumvj$su2@mozo.cc.purdue.edu>

crigler@seo.com (James B. Crigler) writes:

}So I logged on as root, ran
}  perl -MCPAN -eshell
}It ran and installed.  I exited to the root prompt, then restarted with

}again and got these error lines:

}IO object version 1.19 does not match $IO:: 1.15 at /usr/lib/perl5/i386-linux/5.00404/DynaLoader.pm line 185.
}BEGIN failed--compilation aborted at /usr/lib/perl5/i386-linux/5.00404/IO/Seekable.pm line 50.
}BEGIN failed--compilation aborted at /usr/lib/perl5/i386-linux/5.00404/IO/File.pm line 111.
}BEGIN failed--compilation aborted at /usr/lib/perl5/CPAN.pm line 26.
}BEGIN failed--compilation aborted.

}How can I repair my installation so I can use the CPAN module again?

Install the IO patch by hand (not using the CPAN module) and see if
that helps.  (I think the same problem happened to me.)


-- 
Mike Gebis  gebis@ecn.purdue.edu  mgebis@eternal.net


------------------------------

Date: Fri, 20 Mar 1998 13:23:01 -0800
From: "Charles Jaimet" <webmaster@netminder.com>
Subject: Can PERL run in the background?
Message-Id: <3512dd2b.0@news.westel.com>

Does anyone know if it's possible to call a PERL script through CGI from a
Web page form and not have to return a new page or reload the current one? 

Ideally I'd like the user to stay on the form page after submitting the
form.

Any ideas?

Charles
webmaster@netminder.com


------------------------------

Date: 20 Mar 1998 21:37:54 GMT
From: mike@stok.co.uk (Mike Stok)
Subject: Re: Can PERL run in the background?
Message-Id: <6eunji$qqi@news-central.tiac.net>

In article <3512dd2b.0@news.westel.com>,
Charles Jaimet <webmaster@netminder.com> wrote:
>Does anyone know if it's possible to call a PERL script through CGI from a
>Web page form and not have to return a new page or reload the current one? 
>
>Ideally I'd like the user to stay on the form page after submitting the
>form.
>
>Any ideas?

Have you checked out
http://w3.stonehenge.com/merlyn/WebTechniques/col20.html
which might be the basis of an acceptable alternative?

Hope this helps,

Mike
-- 
mike@stok.co.uk                    |           The "`Stok' disclaimers" apply.
http://www.stok.co.uk/~mike/       |   PGP fingerprint FE 56 4D 7D 42 1A 4A 9C
http://www.tiac.net/users/stok/    |                   65 F3 3F 1D 27 22 B7 41
stok@colltech.com                  |            Collective Technologies (work)


------------------------------

Date: 20 Mar 1998 22:17:54 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: chdir in win32
Message-Id: <6eupui$maq$1@marina.cinenet.net>

Duncan Cameron (dcameron@nospam.bcs.org.uk) wrote:
: The following seems to work for me:
: 
: print 'Enter directory (default is perl\docs): ';
: chomp($dir = <>);
: $dir = 'c:\program files\perl315\docs\perl' if ($dir eq '');

I generally advise against using DOS-style \ dir separators in paths.  /
separators work, even under DOS and its descendants, and you run into far
fewer problems with having to double-backslash in "" strings, avoiding \
at the end of a '' string, and so forth. 

---------------------------------------------------------------------
   |   Craig Berry - cberry@cinenet.net
 --*--    Home Page: http://www.cinenet.net/users/cberry/home.html
   |      Member of The HTML Writers Guild: http://www.hwg.org/   
       "Every man and every woman is a star."


------------------------------

Date: 20 Mar 1998 17:35:08 -0500
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: contexts: is there such a thing as array?
Message-Id: <6euqus$gp7$1@monet.op.net>
Keywords: beforehand Bowditch pure smother


In article <6ek9au$6u$1@lyra.csx.cam.ac.uk>,
M.J.T. Guy <mjtg@cus.cam.ac.uk> wrote:
>     THERE IS NO GENERAL RULE FOR CONVERTING A LIST INTO A SCALAR!
>
>is actually rather misleading.   This situation can NEVER OCCUR, 


Yeah, that's rather a problem, isn't it?  People get that rule drilled
into them, and it's the wrong rule.

> so there is no question of a rule, general or particular.

But there *is* a rule.  The rule is:

	There is no rule that relates the behavior of an expression in
	list context to its behavior in scalar context, or vice versa.
	It might do two totally different things.



------------------------------

Date: 20 Mar 1998 21:07:48 GMT
From: Zenin <zenin@archive.rhps.org>
Subject: Re: Cross Platform usage of DBM database
Message-Id: <890428450.577986@thrush.omix.com>

Kaizer Sogiawala <xkaizer@pretzel.com> wrote:
: 3. Use Berkley DB. Is it available on Win32 platform?

	Yes:

	http://www-personal.umich.edu/~gsar/DB_File-1.54-win32-bin.zip

	But most likely you're going to still have bite order problems
	going from Sparc to x86 or vis-versa, regardless of the OS. -Solaris
	on Sparc and x86 also have this problem.  You can thank Intel for
	these problems...

-- 
-Zenin
 zenin@archive.rhps.org


------------------------------

Date: Fri, 20 Mar 1998 22:28:40 GMT
From: Bill Lewis <Bill.Lewis@mci.com>
Subject: DBM files...
Message-Id: <3512ED6B.74DB@mci.com>

I am looking to implement a simple online web maintenance log for
machines.  I have a form to fill out and right now am writing the data
via a perl script to a flatfile.  What I want to do is write it to a
database type file.

Is DBM a viable way to store this data for later retrieval?  I am trying
to make it as painless as possible to move this code to different
platforms after I am finished.

Is it possible to get perl to write to the DBM file?  I have read the
man pages on  tie and untie, but I havent seen any examples of changing
the data and writing it.  Once I do a tie to the hash is any data
changed contained in the file after I untie it?

any help is appreciated.  If there is a site where I can find or read
more about this, drop it to me.

thanks,
-- 
Bill Lewis, Senior Unix System Administrator
MCI Telecommunications Corp.
email: Bill.Lewis@mci.com


------------------------------

Date: Fri, 20 Mar 1998 21:09:13 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: Document contains no data
Message-Id: <Eq4yrD.2Fn@world.std.com>

"R. Sauvi" <rsauve@securenet.net> writes:

>Here's the problem: everything works fine but at every 'submit' I
>get a 'Document contains no data' message. I only want perl to
>write to my file, could that be the problem? Does perl automatically
>want to return some form of data and if so, could I simply return it
>to a hidden frame? The script is basically as follows . . .

Perl doesn't want much of anything. Its only real requirement is that
it has a script on the command line to run. (The script either being
in a file specified on a command line, or the script itself via the
"-e" option.)

perl -e '42'

is a perfectly valid invokation of a perl script.

If your perl script is being run on behalf of another program, lets
say an HTTP server, and that other program expects output in a certain
format, lets say the format specified in the CGI protocol, then that
other piece of software may complain if the output of your perl script
doesn't match the protocol.

If your program is supposed to communicate through sort of protocol,
you might be able to get some answers if you find a newsgroup that
discusses that protocol. If your script is supposed to adhere to the
CGI protocol, (you don't quite say so explicitly, but your post
implies that it is.) maybe you should take a look at the newsgroup
comp.infosystems.www.authoring.cgi.
-- 
Andrew Langmead


------------------------------

Date: 20 Mar 1998 21:37:03 GMT
From: Anirvan Chatterjee <c..bojswbo@87.usenet.us.com>
Subject: Re: Evaluate expression inside print ""
Message-Id: <6eunhv$hd7$1@samba.rahul.net>

Gary Trachier <trachier@crrel.usace.army.mil> wrote:
> Hi Everyone,


> I've been scratching my head over this one, and it is time to ask for
> help.  I want to evaluate an expression inside double-quotes of a
> print statement.  How can it be done?

> 	my	$var = 5;
> 	print "N plus one is ($var + 1)\n";

Try something like the following:

	my $var = 5;
	my $string  "N plus one is ($var + 1)\n";
	$string =~ s/\((.*?)\)/eval $1 or '[error]'/ge;
	print $string;

which should yield

	N plus one is 6

That substititution line grabs everything in parentheses, and replaces
it with its evaluated form. The 'e' modifier tells the substitution
operator to use the replacement text as raw perl code. If the eval
fails, an error message is used instead.

_____________________________________________________________________
Anirvan Chatterjee  . anirvan @ chatterjee.net .  PGP 2048/0xE2D13BA9
Fast & free new/used multi-bookstore searching @ http://www.mxbf.com/


------------------------------

Date: Fri, 20 Mar 1998 21:06:07 GMT
From: Jim Stern <jstern@world.northgrum.com>
Subject: Re: Evaluate expression inside print ""
Message-Id: <3512DA3F.9B0E9988@world.northgrum.com>

Gary Trachier wrote:
> 
> [How to evaluate an expression inside quotes, e.g. ...]
> 
> {
> my $var = 5;
> 
> print "N plus one is ($var + 1)\n";
> }
> It should print out
> N plus one is 6

This program illustrates two methods:

<snip>
#!/usr/local/bin/perl -w
use strict;
my $var = 5;
print "@{[$var+1]}\n";          # Evaluates in an array context
print "${my $v=$var+1;\$v}\n";  # Evaluates in a scalar context
</snip>

Everywhere you code a variable name you can also code a BLOCK
(an expression inside a {} pair) that returns a reference to a
variable.  See perlref for details.
 
-- 
Jim Stern -- Views here are my own, not my employer's.   (Hawthorne, CA)


------------------------------

Date: Fri, 20 Mar 1998 16:28:29 -0600
From: "Alex Oleinik" <cpryor@texhoma.net>
Subject: HELP ME PLEASE!!!
Message-Id: <6euqbl$qpp$1@ionews.ionet.net>

I have a question. How can I write some strings in the middle of a file.
Please, add some comments, I'm just starting with Perl. Thanx.
                                                                            
     -Alex-




------------------------------

Date: 20 Mar 1998 22:49:35 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: HELP ME PLEASE!!!
Message-Id: <6eurpv$maq$2@marina.cinenet.net>

Alex Oleinik (cpryor@texhoma.net) wrote:
: I have a question. How can I write some strings in the middle of a file.
: Please, add some comments, I'm just starting with Perl. Thanx.

This question doesn't make a lot of sense as written.  If you mean "How do
I insert new lines in the middle of an existing text file," that's a FAQ,
so see that for more info.  Basically, the simplest ways are:

* Read the existing file in line by line, copying each line to the output
  file.  When you get to the 'right place', write your new lines, then
  return to the copy loop.

* Slurp the existing file in, modify it as needed, then rewrite the whole 
  thing.

Both of these imply either writing to an explicit temp file then copying, 
or using the -i option to automagically make this happen.

HTH!

---------------------------------------------------------------------
   |   Craig Berry - cberry@cinenet.net
 --*--    Home Page: http://www.cinenet.net/users/cberry/home.html
   |      Member of The HTML Writers Guild: http://www.hwg.org/   
       "Every man and every woman is a star."


------------------------------

Date: Fri, 20 Mar 1998 09:03:06 GMT
From: kucera@mindsrping.com ( Mark Kucera)
Subject: help needed with grep type function for perl script.
Message-Id: <35122f3d.13665389@news.mindspring.com>

I would appreciate some help from some perl experts out there if
possible.

Basically i have a file, or records that contains various information.
i want to be able to search that file for a particular set of data,
and if found in the file, return the line found  or if not found,
return that the text was not in the file.


example  say i have a data file that contains ip information in the
form

room::ip::eth address::nslookup::id

204::127.0.0.1:e399800000000s:host@school.edu::1
205::128.0.0.2:fe90902340000d:host2@school2.edu::2
 ...
 ...
 ...

etc  and i want search this ex file for 128.0.0.2  if 128.0.0.2 is in
the file, then i want all the other informaiton that is on that line,
but other wise  i want to know that 128.0.0.2 is not in this file...


can someone give me some suggestions about how to do this particular
task?


thanks for your help.
mark kucera
kucera@mindspring.com


------------------------------

Date: 20 Mar 1998 16:15:58 -0500
From: Walt Sullivan  <walts@nortel.ca>
Subject: IO version mismatch abort
Message-Id: <yszhogz1m5bl.fsf@bquah49f.ca.nortel.com>

I installed IO version 1.19 in /usr/local/lib/IO.pm (it's also in
/usr/local/lib/site_perl/lib/IO.pm).

When I try to install Date::DateCalc (for instance) the "make test"
step dies with "IO object version 1.19 does not match $IO:: 1.15 at
/usr/local/lib/PA-RISC1.1/5.00404/DynaLoader.pm line 185.".

Help!

Here's a heavily edited logfile:

walt--219> uname -a
HP-UX bquah49f B.10.20 A 9000/778 2014603137 two-user license
walt--200> echo $PERL5LIB
/usr/local/lib/site_perl:/usr/local/lib/site_perl/lib:\
/usr/local/lib/PA-RISC1.1/5.00404:/usr/local/lib/site_perl/lib:\
/usr/local/lib/site_perl/PA-RISC1.1
walt--201> perl -MIO -e 'print "Perl: $]  IO: $IO::VERSION\n"'
Perl: 5.00404  IO: 1.19
walt--202> perl -MCPAN -e shell

cpan shell -- CPAN exploration and modules installation (v1.36)
ReadLine support enabled

cpan> o conf
CPAN::Config options and /opt/1/u1/walts/.cpan/CPAN/MyConfig.pm:
<snip>
    makepl_arg         PREFIX=/usr/local/lib/site_perl
<snip>
cpan> install Date::DateCalc
Running make for STBEY/DateCalc-3.2.tar.gz
CPAN: MD5 loaded ok
Checksum for /opt/1/u1/walts/.cpan/sources/authors/id/STBEY/DateCalc-3.2.tar.gz ok
CPAN: Archive::Tar loaded ok
Removing previously used /opt/1/u1/walts/.cpan/build/DateCalc-3.2

  CPAN.pm: Going to build STBEY/DateCalc-3.2.tar.gz

Checking if your kit is complete...
Looks good
Writing Makefile for Date::DateCalc
<snip -- all is OK up to here>
Running make test
	LD_RUN_PATH="" ld -o ./blib/arch/auto/Date/DateCalc/DateCalc.sl \
 -b -L/usr/local/lib DateCalc.o  lib_date.o     
	chmod 755 ./blib/arch/auto/Date/DateCalc/DateCalc.sl
	PERL_DL_NONLAZY=1 /usr/bin/perl -I./blib/arch -I./blib/lib \
-I/usr/local/lib/PA-RISC1.1/5.00404 -I/usr/local/lib -e \
'use Test::Harness qw(&runtests $verbose); $verbose=0; runtests @ARGV;' t/*.t
IO object version 1.19 does not match $IO:: 1.15 at \
/usr/local/lib/PA-RISC1.1/5.00404/DynaLoader.pm line 185.
BEGIN failed--compilation aborted at /usr/local/lib/PA-RISC1.1/5.00404/IO/Seekable.pm line 50.
BEGIN failed--compilation aborted at /usr/local/lib/PA-RISC1.1/5.00404/IO/File.pm line 111.
BEGIN failed--compilation aborted at /usr/local/lib/Test/Harness.pm line 7.
BEGIN failed--compilation aborted at -e line 1.
*** Error exit code 255

Stop.



------------------------------

Date: 20 Mar 1998 21:57:41 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: ls -l to an array and pull 3 columns on data
Message-Id: <6euool$96k$1@client2.news.psi.net>

schwern@starmedia.net (schwern@starmedia.net) wrote on MDCLXII September
MCMXCIII in <URL: news:6euasb$m66$1@nnrp1.dejanews.com>:
++ I did some benchmarking...
++ 
++ 
++ #!/usr/bin/perl -w
++ 
++ use Benchmark;
++ 
++ $dir = '/usr/bin';
++ 
++ timethese ( 50, {
++                  'readdir' => q'opendir DIR, $dir || die $!;
++ 		                @files = map { [(stat("$dir/$_"), "$dir/$_")]}
++                                          readdir DIR;',
++ 
++ 		 'system'  => q'@array = map { chomp;  [split /\s+/] }
++                                          `ls -l $dir | cut -f1,2,3`;
++                                 shift @array;  # Dump the "total" line.
++                                '
++ 		}
++ 	  );
++ 
++ print "Readdir:\t", scalar @files, "\n";
++ print "@{$files[2]}", "\n";
++ print "system:\t", scalar @array, "\n";
++ print "@{$array[2]}", "\n";
++ 
++ 
++ And I was very surprised at the results...
++ 
++ Benchmark: timing 50 iterations of readdir, system...
++    readdir: 24 secs ( 6.56 usr 14.65 sys = 21.21 cpu)
++     system: 21 secs ( 6.80 usr  0.32 sys +  9.01 cusr  3.22 csys = 19.35 cpu)

I get a wildly different result:

Benchmark: timing 50 iterations of readdir, system...
   readdir:  9 secs ( 5.83 usr  3.01 sys =  8.84 cpu)
    system: 40 secs ( 6.29 usr  2.02 sys + 18.76 cusr 10.47 csys = 37.54 cpu)

That's with GNU ls. Using Solaris ls, the time increases by a third.

$ uname -a
SunOS betelgeuse 5.6 Generic sun4m sparc
$

++ 3)  ls -l returns information in a human-readable format, but its not very
++ usable to a program.  -r-xr-xr-x has to be translated into 0555 somehow.
++ "root" has to be translated into 0.  "Feb 9 19:46" has to be translated into a
++ unix time, etc...  doing all that will blow your efficiencies out the window.
++ When I add in -just- the translation from user and group name to uid and
++ gid...

Hmmm, GNU ls will give you user/group name numerically :)

++ 4) stat returns alot more information than ls -l.  In fact, it gives you just
++ about -all- available information about the file.  How do you get the last
++ access time from ls -l?

ls --format=verbose --time=access



Abigail
-- 
perl5.004 -wMMath::BigInt -e'$^V=new Math::BigInt+qq;$^F$^W783$[$%9889$^F47$|88768$^W596577669$%$^W5$^F3364$[$^W$^F$|838747$[8889739$%$|$^F673$%$^W98$^F76777$=56;;$^U=substr($]=>$|=>5)*(q.25..($^W=@^V))=>do{print+chr$^V%$^U;$^V/=$^U}while$^V!=$^W'


------------------------------

Date: Fri, 20 Mar 1998 21:56:35 GMT
From: jgloudon@manitoba.bbn.com (Jason Gloudon)
Subject: Re: ls -l to an array and pull 3 columns on data
Message-Id: <slrn6h5pe4.t0c.jgloudon@manitoba.bbn.com>

In article <6euasb$m66$1@nnrp1.dejanews.com>, schwern@starmedia.net wrote:
>I did some benchmarking...
>
>
>#!/usr/bin/perl -w
>
>use Benchmark;
>
>$dir = '/usr/bin';
>
>timethese ( 50, {
>                 'readdir' => q'opendir DIR, $dir || die $!;
>		                @files = map { [(stat("$dir/$_"), "$dir/$_")]}
>                                         readdir DIR;',
>
>		 'system'  => q'@array = map { chomp;  [split /\s+/] }
>                                         `ls -l $dir | cut -f1,2,3`;
>                                shift @array;  # Dump the "total" line.
>                               '
>		}

This "benchmark" like all other benchmarks has limited meaning. The first time
through the readdir loop incurs the most overhead ie. possibly actual disk I/O
to read the directory entries and the inodes for the various files.

--
Jason Gloudon


------------------------------

Date: Fri, 20 Mar 1998 16:11:03 -0600
From: julie.rudolph@teldta.com
Subject: Math and ffround
Message-Id: <6eupe5$cnc$1@nnrp1.dejanews.com>

Hello:
i recogn that this is a newbie question, but i cannot find any examples out
there. and i'm under a serious deadline.

i am stuck on a little nugget of a problem:  in my script, i add, multiply and
divide large numbers (in the millions,etc).  so, i am thinking that i should
use the Math::BigFloat module to ensure accuracy when i perform all these
operations on these numbers. Is this true??

Question: could someone please send me an example useage of ffround.  i see
how fmult works, but am missing something when it comes to ffround.

Also, how does one go from a NSTR back to a normal looking number?  i.e. i
want to change +34012444E-6 to 34.012444 when i print it.

thanks for any help or pointers,
Julie.

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/   Now offering spam-free web-based newsreading


------------------------------

Date: Fri, 20 Mar 1998 16:40:54 -0500
From: Vinnie <browns1@borg.com>
Subject: ODBC datasources!
Message-Id: <3512E266.B44291C7@borg.com>

I am trying to access a ORACLE table via ODBC using Perl!  Can this be
done? If so how?

Vinnie Salerno



------------------------------

Date: Fri, 20 Mar 1998 21:38:56 GMT
From: sastry Varanasi <sastry_varanasi@tandem.com>
Subject: Perl-> MS-Access
Message-Id: <3512E3F1.79B4C1E4@tandem.com>

I have MS-Access 97 installed on my NT workstation. I also have
Access2.0, which I use only   to download
some  data from a Sybase server. I am trying to automate certain tasks
using Perl, where I need to start both Access 97
and Access2.0 one after another.

The problem here is that, When I use
$application = CreateObject OLE "Access.application" , it starts
Access97. I dont know how to start Access2.0
using this method. When I saw the registry for Access 97, I could find
Access.Application.8 entry, and I could use
$application = CreateObject OLE "Access.application.8"  for starting
Access97.
Can I create something similar, may be Access.Application.2 for Access
2.0, in the registry, and use the statement
$application = CreateObject OLE "Access.application.2" ? If so can
somebody give me the details of how to create it in Registry?

Thanks in advance,
Sastry.



------------------------------

Date: Fri, 20 Mar 1998 21:30:38 GMT
From: jgloudon@manitoba.bbn.com (Jason Gloudon)
Subject: Re: Question about DBM Array
Message-Id: <slrn6h5nte.t0c.jgloudon@manitoba.bbn.com>

lihong@public1.guangzhou.gd.cn wrote:
>I am using my workstation Perl.  Is there any way to
>know the version of perl. (not like perl5 which is stated
>in the first line of script#!/usr/local/bin/perl5), the
>first line in my script should be /usr/local/bin/perl.
>so what's its version?

Your quesetion isn't worded too clearly, but if you want to know what version
of the perl interpreter is installed perl -v.

Within a script you can use what `man perlvar` talks about

     $]      The version + patchlevel / 1000 of the Perl
             interpreter.  This variable can be used to determine
             whether the Perl interpreter executing a script is
             in the right range of versions.

-- 
Jason Gloudon


------------------------------

Date: Fri, 20 Mar 1998 16:46:28 -0600
From: sflorcsk@email.aphis.usda.gov
Subject: Redirecting output
Message-Id: <6eurgj$fa9$1@nnrp1.dejanews.com>

Hello. Doing something new in perl and am pretty sure someone here can help.

We have a server with Oracle and Perl on it. I run oracle scripts and redirect
the output to the browser through a subroutine I wrote (&sql) that gets passed
a SQL login and SQL code (@sql_code), resembling:

&sql("username/password",@sql_code);

Here's my question. Instead of redirecting the output of this subroutine to
the screen (which works successfully), I want to redirect it to a file, in
PERL (not Oracle).

So far, I've tried:
&sql("username/password",@sql_code) >"/opt/users/scott/results.ascii";

but no luck. Any help would be appreciated.

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/   Now offering spam-free web-based newsreading


------------------------------

Date: Fri, 20 Mar 1998 09:06:37 GMT
From: kucera@mindsrping.com ( Mark Kucera)
Subject: Re: sending mail through perl
Message-Id: <3512317a.14238143@news.mindspring.com>

the below code should work i agree, but you might need to preface your
@'s with a \ so the perl interpreter doesn't try to make it an
array...
mark


On 20 Mar 1998 20:47:41 GMT, neilb@zetnet.co.uk (Neil Briscoe) wrote:

>In article <6eub68$8ht$1@pinot.ext.jussieu.fr>, Francois_Bor@bde.espci.fr
>() wrote:
>
>> hello !
>>
>> i would like to send amils through my perl program.
>> I have found in a book that i should make a pipe, so that i have done
>> it that way :
>>
>> $filedemel = "| /bin/mailx -s "`cat subjectfile`" `cat tofile`";;
>> open (MAILE, $filedemel);
>> ....
>>
>> the trouble is that :
>> - i have to put  " " after -s for the subjet ( cause mailx need it)
>> - but when the perl program meet this "", it think it is the end of
>> the one before : $findemel = "....,
>> so that it doesn't work.
>>
>> i search a way to send a subject trough mailx in perl program. Could u
>> help me ?
>>
>
>Easiest way for what you're trying to do is :-
>
>#!/usr/local/bin/perl
>
>open(MAIL, "| /usr/lib/sendmail -t") || die "No sendmail available: $!\n";
>
>select(MAIL); $| = 1;
>
>print "To: someone@somewhere.com\n";
>print "From: you@elsewhere.com\n";
>print "Subject: The way to do it\n\n"; # Blank line separates headers
>print "The mail message goes here, over multiple\n";
>print "lines if need be.\n";
>print ".\n"; # Some versions need the dot
>close(MAIL);
>
>I hope that helps.
>
>Regards
>Neil
>



------------------------------

Date: Fri, 20 Mar 1998 20:52:56 GMT
From:  (Phil Hanna)
Subject: Re: Stinking lousy $*(@#*$@ cmd lin args-HELP
Message-Id: <3512d4be.83116593@newshost.unx.sas.com>

On Thu, 19 Mar 1998 16:20:18 -0600, "rickryan@ Mindspring"
<rickryan@mindspring.com> wrote:

>I'm trying to capture a command line argument from within a perl script. I
>realize it's not rocket science and I've spent the whole day searching for
>the answer. Here's what I'm doing: (on yea, it's running on an NT server)
>
>(this is typed in from the browser's address prompt)
>
>script.pl?arg1

I assume that you are talking about a CGI perl script, not a perl
script invoked from a command line.  In that case, what follows the
"?" is passed one of two ways, depending on how you have invoked it.
Check the environment variable REQUEST_METHOD (available to you as
$ENV{'REQUEST_METHOD'})

1. REQUEST_METHOD = GET

This will be the case if you have invoked your script from a browser
command line or from an HTML form with METHOD=GET.  The data that
follows the "?" can be found in the environment variable QUERY_STRING,
which you can retrieve as $ENV{'QUERY_STRING'}.

2. REQUEST_METHOD = POST

This is the case if the script is invoked from an HTML form with
METHOD=POST.  In this case, read the data from stdin.  The exact
length is in the environment variable CONTENT_LENGTH.

Note that in either case you need to translate the raw input to
separate the key/variable pairs, decode the %hh hex strings, etc.
Check http://hoohoo.ncsa.uiuc.edu/cgi/interface.html
for details.

----------
Phil Hanna
saspeh at unx dot sas dot com


------------------------------

Date: Fri, 20 Mar 1998 22:48:13 GMT
From: bob.rizzo@funb.com (Robert Rizzo)
Subject: SybPerl for NT 4.0?
Message-Id: <3513f204.104140446@cmnews.capmark.funb.com>


Does SybPerl exist on NT 4.0?

thanks,
bob



------------------------------

Date: 20 Mar 1998 21:21:05 GMT
From: Zenin <zenin@archive.rhps.org>
Subject: Re: Using perl code as a config file syntax? (Or, can require return more then one value?)
Message-Id: <890429247.360189@thrush.omix.com>

Uri Guttman <uri@sysarch.com> wrote:
	>snip<
: my %config =

	This (the my()) would stick it the lexical scope of the current
	block, in this case the config file.  It could not be seen outside
	this block.

: 1 ; # needed to return true to require

	No need, as the data structure would return true anyway.

: the only problem is you can't set which var is being set in the main
: file. it is in the required file only.

	Without the my(), yes.  But I still don't like the idea of using
	a global.  Thanks, but I'll keep looking. :-)

-- 
-Zenin
 zenin@archive.rhps.org


------------------------------

Date: 20 Mar 1998 21:24:20 GMT
From: Zenin <zenin@archive.rhps.org>
Subject: Re: Using perl code as a config file syntax? (Or, can require return more then one value?)
Message-Id: <890429441.994532@thrush.omix.com>

Andrew M. Langmead <aml@world.std.com> wrote:
: How about creating a reference to the list value, and dereferencing
: the return value from require.

	I thought about this after I posted my question.  Yes, this works
	vary well.  I still wish require() would return a list when asked
	too (wantarray()), but this will work for now. :-)

	Thanks!

-- 
-Zenin
 zenin@archive.rhps.org


------------------------------

Date: 20 Mar 1998 21:22:25 GMT
From: Zenin <zenin@archive.rhps.org>
Subject: Re: Using perl code as a config file syntax? (Or, can require return more then one value?)
Message-Id: <890429326.894273@thrush.omix.com>

Jonathan Feinberg <jdf@pobox.com> wrote:
: Have you looked into (and rejected) Data::Dumper?
	>snip<

	Yes.  It's overkill for my usage.  I'm not trying to save
	data stuctures, I'm trying to simply read them.

-- 
-Zenin
 zenin@archive.rhps.org


------------------------------

Date: 20 Mar 1998 21:30:48 GMT
From: Zenin <zenin@archive.rhps.org>
Subject: Re: Using perl code as a config file syntax? (Or, can require return more then one value?)
Message-Id: <890429830.644860@thrush.omix.com>

Mike Stok <mike@stok.co.uk> wrote:
: Data::Dumper writes stuff out in a form which is an eval-able assignment.
: You might want to look at

	I'm not trying to write the file, just read it.  Data::Dumper is
	overkill for this use, but thanks.

: .../CPAN/modules/by-category/12_Opt_Arg_Param_Proc/ConfigReader/

	Like I mentioned, I've looked at all the config readers at CPAN
	and have yet to find one I like...which is why I just wanted to
	eval/require/etc pure perl code.

	I'm working on (yet another) config reader that uses syntax similar
	to Getopt::Long.  Simple and efficient.  Far too many modules I see
	throw the KISS design right out the window...

-- 
-Zenin
 zenin@archive.rhps.org


------------------------------

Date: 20 Mar 1998 21:28:11 GMT
From: stanley@skyking.OCE.ORST.EDU (John Stanley)
Subject: Re: Wanted: email address gleaner
Message-Id: <6eun1b$gur$1@news.orst.edu>

In article <35125A13.5D29@glpbooks.BADMAIL.com>,
Jeff Potter  <jp@glpbooks.BADMAIL.com> wrote:
>Any offline project involving a newsgroup interest will cost money. 

I have no idea what this is supposed to mean or how it is relevant to
your desire to make money from things other people have written, and
your desire to be able to spam them because of that.

>The rec.bicycles.racing newsgroup sells t-shirts and organizes
>trips for Team Internet. 

Goody for them. That is not a "newsgroup archive", nor is it sending
email to everyone who has ever posted to a newsgroup.

>Rec.hunting had a fundraiser to show 
>financial appreciation for its hardworking volunteer moderator.

Goody for them, too. Ditto the remarks about archive and spam.

>I've had requests to reprint my NG posts in magazines. 

Goody for you. You are free to reprint what you have written. This is
completely irrelevant to your desire to spam.

>My project is to make a paper directory of hard to find restaurants.

So do that. Who is stopping you?

>We've discussed the need for a permission-asking program in the
>restaurant NG.

You need no permission to make a directory of restaurants, unless it
would be from the restaurant itself. That is, as long as you aren't
usurping someone else's work. Once you want to profit from other
people's work, yes, you need permission. And to get it from all of
them, you will be spamming. I guess you are stuck. Will your desire for
money cloud your judgement and "force" you to spam?

>I've never seen a squawk in these NG's about any of this being spam,

Holding fund raisers is not spam. Nobody has said it was. 

>nor have I felt like complaining when I've been approached similarly.

Goody for you.

>I've been involved in NG's for 8 years and thought I had a notion
>about what spam was.

Apparently not.

>So I'm still not seeing what you mean. 

Either because you still want to profit from other people's work and
expect they will be happy to hear from you just because they posted to a
newsgroup, or because you just don't understand what spam is.

>Is it emailing someone to ask for permission to reprint their work? 

Unsolicited commercial bulk mail.  You figure it out.

>Why different if I emailed everyone there who'd made a
>post that I wanted to use? (Excluding duplicates of course.)

Unsolicited commercial bulk mail. You figure it out.



------------------------------

Date: Fri, 20 Mar 1998 15:25:44 -0600
From: tim@maroney.org
Subject: Re: what is wrong with being a novice ??
Message-Id: <6eumoo$8og$1@nnrp1.dejanews.com>

You are quite correct in your concerns. Theoretically the justification for
flaming newbies is that repeated questions that could easily be resolved from
the FAQ or other online documentation waste everyone's bandwidth. In fact,
though, it is obvious that public flames in response to these offenses are
complete wastes of bandwidth, more so than the original question. Wading
through technical groups on USENET these days, one literally finds dozens of
these read-the-faq flames per newsgroup per day. Which is a greater waste --
sincere questions, or asinine flames?

If the flamers actually wanted to change the behavior of these people, they
would send them _private_ messages pointing them to the FAQs and other online
resources. The fact that they post in _public_ shows that they are actually
more concerned with engaging in braggadoccio -- "hey look, everybody, I know
more than this loser!" This behavior is immature and obnoxious, wastes
everyone's time, and makes all the technical groups far less usable.

I don't know who these peoplethink they are fooling when they pretend to be
concerned about bandwidth, when in fact they are the biggest bandwidth
wasters. This behavior is transparent, and I'd wager ten-to-one odds that some
of the prime flamers have lost more than one job due to a lack of people
skills.

-----== 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 2147
**************************************

home help back first fref pref prev next nref lref last post