[8315] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1932 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Feb 19 13:11:18 1998

Date: Thu, 19 Feb 98 10:00:23 -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           Thu, 19 Feb 1998     Volume: 8 Number: 1932

Today's topics:
        5.004 bug? invisible object dereferencing <ceh@sce.carleton.ca>
    Re: Can you read AND write to a child process? (Matthew H. Gerlach)
    Re: Can you read AND write to a child process? (Andrew M. Langmead)
    Re: Collon-seperated files? (Craig Berry)
    Re: Collon-seperated files? who@wantstoknow.com
    Re: Help for Hashes !! (Gabor)
    Re: Help Need ASAP! (Andrew M. Langmead)
    Re: Is perl and DBI good enough? <jonas@paranormal.o.se>
    Re: LWP Question <mj@atmm.nl>
    Re: My first perl program, yippee! <k.james@bangor.ac.uk>
        need help on comparing variables (Jsgines)
    Re: Newbie question (Craig Berry)
    Re: Newbie question: Displaying contents from a file. <craig@mathworks.com>
    Re: newby perl string processing Q <mj@atmm.nl>
    Re: Read the FAQ ...need milliseconds (Jonathan Feinberg)
    Re: Read the FAQ ...need milliseconds (John Klassa)
    Re: Read the FAQ ...need milliseconds (David J Meyer)
        rename error (Cross-device link) <doug@weboneinc.com>
        rename error (Cross-device link) <doug@weboneinc.com>
    Re: rename error: please disregard <doug@weboneinc.com>
    Re: Taint / exec / stderr (Jonathan Feinberg)
        Win32::AdminMisc::UserGetMiscAttributes - help- Request <yosefy@iil.intel.com>
    Re: Writing a "println" function that works just like " <cmargoli@world.northgrum.com>
    Re: Year 2000 Compliance: Lawyers, Liars, and Perl <billgates@microsoft.com>
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: 19 Feb 1998 10:55:13 -0500
From: Curtis Hrischuk <ceh@sce.carleton.ca>
Subject: 5.004 bug? invisible object dereferencing
Message-Id: <wkd7m6rpp26.fsf@suntan.sce.carleton.ca>

Help. I am running Perl version is V5.0 patchlevel 4 subversion 4,
Solaris 2.5.1.  The problem is that references to objects are
invisibly dereferenced (in successive lines) which is causing me all
sorts of grief. 

The following code will help to understand the bug:
================================================================
 . . . 
 $self->thread_find_by_time( $aref ); # aref is from package AppTime.pm
 . . . 

 sub thread_find_by_time
 {
   my $self = shift;
   my($rap_time) = @_;

   print "type is ", ref( $rap_time ), "\n"; ##### type of reference
   if ( ref ( $rap_time ) ) {
     print "It is a reference\n";            ##### double check it is a reference
   }
   print "mytime is " . $rap_time->stringize() . "\n"; # error!! executes
                                                       # without dereference


================================================================
It prints out:

 type is AppTime             ##### type of reference
 It is a reference           ##### double check it is a reference
 my_time [0.830217:   4: 97] ##### error, method called without
                             ##### an explicit dereference


Has this problem been seen before?  Is there a patch available?  I
am submittint this to perlbug@perl.com.

Do the CPAN sites have a list of known bugs for a perl version?

Thanks for your time.

Curtis


-- 
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
_/ Curtis Hrischuk (PhD Cand)  "in reality that comes from above      _/
_/ ceh @ sce . carleton . ca    God is calling                        _/
_/ Carleton University          there's no bigger love                _/
_/ Ottawa, On., Canada, K1S-5B6 It's his reality that welcomes us back_/
_/ Ph  (613) 520-2600 x1762     Trust and obey                        _/
_/ FAX (613) 520-5727           there is no other way..." the newsboys_/
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/


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

Date: Thu, 19 Feb 1998 15:19:19 GMT
From: gerlach@netcom.com (Matthew H. Gerlach)
Subject: Re: Can you read AND write to a child process?
Message-Id: <gerlachEoMt87.F2x@netcom.com>

In article <34EC24AE.27D884E1@golden.net> Mark McKay <kitfox@golden.net> writes:
>Hi.  I'm tyring to get perl to communicate with a small program I wrote
>(in C++) through STDIN & STDOUT.  

Try Expect.pm


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

Date: Thu, 19 Feb 1998 16:13:19 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: Can you read AND write to a child process?
Message-Id: <EoMvq7.7qA@world.std.com>

Mark McKay <kitfox@golden.net> writes:

>Hi.  I'm tyring to get perl to communicate with a small program I wrote
>(in C++) through STDIN & STDOUT.  I've been through my Camel book, but
>can't seem to get the thing to work.  Right now I have a copy of the
>binary (called 'db_access') both in my ~/bin and ./ directories.  The
>general idea is you send one (fairly short) string to it's STDIN, and it
>spits out a formatted database query at it's STDOUT.  Here's my code so
>far:

Set the filehandle that you use to write to your C program to command
buffering mode:

use IO::Handle;

PTO_QUERY->autoflush(1);

and make sure your C++ unbuffers, or at least linebuffers its
output. Most stdio implementations default to line buffering when the
output is a terminal and block buffering when it is not. The pipe that
open2 connects to the other process obviously fits under the catagory
of "not a terminal." Also many C++ streams libraries are just wrappers
over an existing C stdio library, so the same "terminal/non-terminal"
distinction applies.

If you do this, you can ignore the other suggestion of Expect.pm, This
module just sets up a pty between your processes, which being a
"psuedo-terminal" fools the stdio library into line buffering.
-- 
Andrew Langmead


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

Date: 18 Feb 1998 17:21:45 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Collon-seperated files?
Message-Id: <6cf5b9$lrb$1@marina.cinenet.net>

(Al)Fred Heller (ajh@ibe.dtu.dk) wrote:
: How can I seperate collonseperated files (or semi-collon ...)?

perldoc -f split

It's 'colon', by the way, one L.

---------------------------------------------------------------------
   |   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: Thu, 19 Feb 1998 21:29:44 GMT
From: who@wantstoknow.com
Subject: Re: Collon-seperated files?
Message-Id: <34eca3b4.10155962@news.mindspring.com>

On 18 Feb 1998 17:21:45 GMT, cberry@cinenet.net (Craig Berry) wrote:

>(Al)Fred Heller (ajh@ibe.dtu.dk) wrote:
>: How can I seperate collonseperated files (or semi-collon ...)?
>

Yes, I have had the sameproblem.  It seems that collon keeps coming in
late at night when I am gone and separating all my files.  I dont know
why you would refer to him as semi-collon, is this one of his helpers.

I am gathering evidence on collon, would you like to send me the files
before and after collon has performed his work.  

Collon, I am watching you, and you will not succeed.

Who


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

Date: 19 Feb 1998 15:01:48 GMT
From: gabor@vmunix.com (Gabor)
Subject: Re: Help for Hashes !!
Message-Id: <slrn6eoika.gbo.gabor@vnode.vmunix.com>

In comp.lang.perl.misc, Bob Trieger <corky@ultranet.com> wrote :
# Tod Thomas wrote:
# 
# > Can I use the key valued with - foreach $userid (key %AssociativeArray)
# > - to determine if an entry in another hash exists; like if
# > (exists($AssociativeArray{$userid})) ??  If anybody has used a key from
# > one hash to search another or can otherwise help I would really
# > appreciate it.
# > 
# > Thanks - Tod Thomas
# 
# Don't use foreach with hashes. Use while.

Why not?

for (keys %hash) {
    print "$_ is a key\n" if exists $hash{$_};
}

# while (($key,$value) = each %hash) {...}
# 
# to test for a key use
# 
# if ($hash{$key}) {...}

That's plain wrong.  What if the value evaluates to 0?
Use exists.

if(exists $hash{$key}) {}

gabor.
--
    Let's say the docs present a simplified view of reality...    :-)
        -- Larry Wall in  <6940@jpl-devvax.JPL.NASA.GOV>


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

Date: Thu, 19 Feb 1998 15:19:41 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: Help Need ASAP!
Message-Id: <EoMt8t.3s2@world.std.com>

Savonnya rodrigues <srod@fedex.com> writes:

>Need to be able to do a function call in a Perl script to a C program. I
>know someone told its not possible, but I am just asking. The program
>that I am using is doing a function call in C to a C compiler. Is there
>a way I could use a function call for Perl?

Are you talking about a C function, or a C program? You mention both,
so I just want to make sure you realize the difference between the
two. (If you don't, then you might want to enlist the help of someone
who does.)

To run a C program, use one of the following constructs, the system()
function, the backtick operator (`program`), or the open() function
with the pipe argument. (See the entries for system() and open() in
the perlfunc man page and the entry for qx`` in the perlop man page
for details.)

If you have a C function that you want to be able to call from your
perl program, you can use the "h2xs" program included with perl to
create the files needed to build a perl module that calls the C
function(s). See the perlxs and perlxstut man pages for details. This
will be a very difficult endeavor unless you know the C language
already. So if you are not familiar with the language, again, I'd
recommend you seek out someone who does.

If you have complete C program, compiled into binary form, and want to
call one function from it, I'm afraid you are pretty much out of luck.

-- 
Andrew Langmead


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

Date: Thu, 19 Feb 1998 17:23:44 +0100
From: Jonas Liljegren <jonas@paranormal.o.se>
Subject: Re: Is perl and DBI good enough?
Message-Id: <34EC5C90.9C09C0C1@paranormal.o.se>

I continue here a discussion from the dbi-users mailinglist and
comp.lang.perl.modules


I wrote:

Is it realistic to use perl with DBI for a large project for a big
company? Should we use java servlets CGI instead of perl CGI?


We had a meeting today about this. Maby I was bad at presenting perl,
but
they choosed servlets. I lost. :-(

http://www.javasoft.com/marketing/collateral/servlets.html


I thank you all for the answers about using perl in big projects. I
would
like to continue the discussion. I don't know if this is the proper
place
for that. But I continue for now.


The goal is to have a development tool there you realy fast can put
together different components. The components shold work together
without
side effects. New programmers have to be able to quickly understand a
single component to make modifications.


1. Java forces you to make structured programs. You don't have to invent
a
programming structure. The controls ar built in to the language.

2. Java has many development tools. Drag'n drop programming interfaces.
Meta-tools for object-oriented programming, documentation, version
control
etc. The graphical interface makes it somwhat easier to use without
having
to learn the details about it.

3. I don't get it, but they din't seem to be impressed of CPAN, the perl
community or the Perl Clinic. Like: "We can't depond on the free support
fromhighschool students that wrote cool perl modules. We will get in the 
situation there we can't get help just becuse the programmer student has
a
paper to do." And the rule out the Perl Clinic because it doesn't sound
serious enough. Six-packs and "money back" is not the type of support we
seeks. We want dedicated professional programmers, tied with support
contracts on a per year basis. The Perl clinic seems more like a hacker
support for isolated fixes.

We can't use modules at CPAN just like that. What kind of quality
control has they gone through? Many of the DBD modules seems to be in 
alpha or beta stage. The price of the modules isn't an issue. The
fact    
that the modules doesn't cost anything is not a plus, but their
shifting  
quality is a minus. :-(

4. The future. Is it better to take every chanse to build competence
in   
java? There seems to be more java programmers availibel than perl 
programmers. At least in my company.  


The answers on this list tells me that there has been big projects with
perl dbi. But is this the normal case? Maby most projects has been
developed in C++ or other languages?


I would realy like a remedy for the points above. All you who has
developed big programs: how do you structure the components to eliminate
mistakes and enable fast development?


-- 
 / Jonas Liljegren
 mailto:jonas.liljegren@infohwy.se


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

Date: Thu, 19 Feb 1998 17:02:04 +0100
From: "M.J. Pieters" <mj@atmm.nl>
Subject: Re: LWP Question
Message-Id: <6chl0c$ahi$1@news.worldonline.nl>


Manhattan5 wrote in message
<19980218050701.AAA13726@ladder03.news.aol.com>...
>Hello,
>
>I am a beginner Perl programmer. I have a program that runs on the
>command line fine:
>
>
>> print "Content-type: text/html\n\n";
>>
>>  use LWP::Simple;
>>
>>  $myfile = get "http://www.anyserver.com/anycgi.pl";
>>
>>  print "$myfile";
>>


At least you read your manuals.

>  when i type "perl5 program.cgi" it works great but whe I try to run it
>from a browser adding "#!/usr/bin/perl5" at the top it no longer works.
>Why is this?


Are your Unix Filesystem flags set to allow execution? Check this with ls -l
program.cgi
It should show something like:
-rwxrwxr-x    1 user       group      8384 Feb 17 14:52 program.cgi

If you don't have any x's, do this:
chmod program.cgi

Now test this from the command line:
program.cgi

This should now work. Now test it from your webserver again. If this doesn't
work, it's your webserver.
Check other documentation or FAQ's.

>
>When I type whereis perl5 I get:
>
>> /usr/bin/perl5
>>
>I get a 500 error on the page. So I am confused since I added the
>content-type line and all.
>


Server error messages can mean anything. Check the error logs too....

>Thank you for your input. My e-mail address is omc@worldnet.att.netX
>(minus the X at the end to prevent spam). :)
>


M.J. Pieters, Web Developer
| Audax Tros MultiMedia http://www.atmm.nl
| Tel: +31-35-6254545 Fax: +31-35-6254555
| mailto:mj@atmm.nl http://www.atmm.nl/~mj
 ------------------------------------------




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

Date: 19 Feb 1998 17:41:35 +0000
From: Keith James <k.james@bangor.ac.uk>
Subject: Re: My first perl program, yippee!
Message-Id: <m3vhubze40.fsf@pwilliams.bangor.ac.uk>

>>>>> "Matthew" == Matthew Pryor <matt.pryor@dial.pipex.com> writes:

    Matthew> I've tested it quite a bit, but if anyone can see any
    Matthew> glaring errors which I've missed I'd be eternally
    Matthew> grateful if they can point them out.

<rant>

Glaring errors? You unneccessarily encoded your script. You posted an
encoded attachment to a text-based forum.

Don't get me wrong, I like to see others' work and learn from it, but
if it comes encoded (outside of a binaries group) I won't see it. So I
can't comment on your program.

</rant>

-- 
Keith James Ph.D. - k.james@bangor.ac.uk - http://www.bangor.ac.uk/~bss194 
Biodegradation Group - School of Biological Sciences - University of Wales
PGP preferred when your e-mail is not for 3rd parties - www for Public Key
Public Key fingerprint is 8F 60 5A 4D DB A9 23 65  7D 95 62 19 F0 9C A8 E0


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

Date: 19 Feb 1998 17:20:05 GMT
From: jsgines@aol.com (Jsgines)
Subject: need help on comparing variables
Message-Id: <19980219172001.MAA16797@ladder02.news.aol.com>

I am writing a script that reads a log file.  each line in the log file has a
different length and comes in the following format, the short script im writing
follows afterwards:

980210 183036 (1814), Fax Server Initialized
980210 183036 (1814), Listening for a connection on TCP/IP port 28747
980210 183646 (1814), New connection from address 153.xxx.xxx.xxx
980210 183646 (1814), Fax service child has been born (PID=1866)
980210 183647 (1866), User "jsgines" logged in
980210 183647 (1866), Server: P2 Enabled. MTU = 9976
980210 183647 (1866), Coversheet List Start
980210 183647 (1866), Coversheet List Done
980210 183851 (1866), Submit Fax Start
980210 183851 (1866), (T)Submit Title: HFC->6:40 test 021098
980210 183851 (1866), Submitting a PostScript job
980210 183851 (1866), Submit Title: HFC->6:40 test 021098
980210 183851 (1866), Submit Fax Target record (name=HFC CODA FAX)
980210 183851 (1866), New Status Phone Number Key: 000000630001
980210 183851 (1866), Parse of: 7036454395
980210 184353 (1866), 
980210 184353 (1814), Last child just logged out.
980210 184840 (1814), New connection from address 153.xxx.xxx.xxx
980210 184840 (1814), Fax service child has been born (PID=1919)
980210 184840 (1919), User "jsgines" logged in
 .....starts all over again....

the issue is that the "user name" to query is located in the fifth column, and
the information I want is located in the following lines:
 ....(after locating user name in fifth column)....
980210 183851 (1866), Submit Title: HFC->6:40 test 021098
980210 183851 (1866), Submit Fax Target record (name=HFC CODA FAX)
980210 183851 (1866), New Status Phone Number Key: 000000630001
980210 183851 (1866), Parse of: 7036454395

I know that when the PID (1866) changes to another PID, then it should stop
extracting information.  Any tips on how to do this?  Im guessing 
the way to solve this is write a sub that will compare PIDs line by line, and
when the PID changes.  It searches for the next instance of the user name and 
does the same steps all over again until the end of the file is reached. Any
pointers or help for this newbie is greatly appreciated. 

#!/usr/local/bin/perl -w
print "Enter name or fax destination # :\n ";  # query a user account (ie.,
jsgines)
chomp ($query = <>);
print "Enter log file to query against:\n";       # enter the name of the log
file
chomp ($log = <>);

my $oldpid = "";
my $newpid = "";
my $pid = "";
my @pidlist = ();
open(LOGFILE, "../log/$log") || die "Cannot open Log $log \n";

#*********************************************************

@lines = <LOGFILE>;                              # store logfile as an array,
to access line by line
for ($i = 0; $i<=$#lines; ++$i)
   {
   if ($lines[$i] =~ /$query\b/) {              # Store each line in array
     print $lines[$i];
     searchFaxJobs();

     @splitlines = split(/ /,$lines[$i]);       # Split up line as an array
     $pid = $splitlines[2];                        # Get PID
     print "PID = $pid\n";
     $userlogin = $splitlines[4];               # Get username; $query
     print "Query entered was $userlogin\n";    # search line
     print "\n";
      } else {
     print "User $query was not found\n";

      }
     }
sub searchFaxJobs {         # search algorithm is dependent on PID
                                       # when PID changes, exit the sub, and
read the log file again.
        print "Entering searchFaxJobs subroutine\n";

        for ($i..$i<=$#lines) {
        print if ($lines[$i] =~ /Submit Fax record/);
        }
        print "Exiting searchFaxJobs subroutine\n";

        }

-Jonathan Gines
UUNET Technologies
Sr. Engineer
jsgines@uu.net



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

Date: 19 Feb 1998 16:01:08 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Newbie question
Message-Id: <6chl04$idc$1@marina.cinenet.net>

Eric Bohlman (ebohlman@netcom.com) wrote:
: Jay Cruto <jrcruto@bechtel.com> wrote:
: : What is the command/function to display the current date using the format
: : DD-MMMM-YY?  I'm using Perl 5.  Thanks for your help.
: 
: Go over to CPAN and look at the various Date:: modules.  One of them 
: should do the trick for you.
: 
: I do hope, though, that you have a typo in your format.  Four-letter 
: months can read a bit funny ("01-Apri-98") and two-digit years are passe.

"12-May -98" is especially funny.

For all new date work, I'd strongly recommend going to the ISO-approved 
YYYY-MM-DD or a similar format.  Among other advantages, you can sort it 
lexically.

---------------------------------------------------------------------
   |   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: Thu, 19 Feb 1998 11:20:49 -0500
From: Craig Ciquera <craig@mathworks.com>
To: cia1@ix.netcom.com
Subject: Re: Newbie question: Displaying contents from a file.
Message-Id: <34EC5BE0.E32A3BC1@mathworks.com>

There is some information missing here -- like does the data in form.log
look like, do you want to produce an html page or simply view the file in a
web browser, etc...

I would defer answering this question until you look at the following site:

http://www-genome.wi.mit.edu/ftp/pub/software/WWW/cgi_docs.html

It has some great information which I think you would find useful.

Craig

cia1@ix.netcom.com wrote:

> I've got a Perl script (form.cgi) that takes the
> form input and writes it to a file (form.log).
> Can someone explain to this perl newbie
> how display the contents of that file on a
> web page?
>
> Thanks in advance!!
> Dave
>
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/   Now offering spam-free web-based newsreading



--
Craig Ciquera                       Tel: (508) 647-7547
The Mathworks, Inc.                 FAX: (508) 647-7002
24 Prime Park Way, Natick MA 01760
mailto:craig@mathworks.com          Web: http://www.mathworks.com




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

Date: Thu, 19 Feb 1998 17:11:01 +0100
From: "M.J. Pieters" <mj@atmm.nl>
Subject: Re: newby perl string processing Q
Message-Id: <6chlh4$ana$1@news.worldonline.nl>


Bob Trieger wrote in message <34EBB0BE.4A12@ultranet.com>...
>Brian O'Connor wrote:
>>
>> OK, I've looked and looked but I can't find this;
>>
>> How do I extract a particular field from a line of char delimited
>> fields without assigning the whole lot to unused variables. eg
>>
>> A password file, I want the 4th field(grp id)
>>
>> I can
>>
>> ($a,$b,$c,$d,$e,$f,$g) = split(/:/);
>>
>> then use $d, but there must be a better way
>
>
>@array = split(/:/); #this reads your string into an array
>
>then you just reference the 4th element in the array.
>arrays count from 0 so $array[3] is your choice.
>


Even worse: $d = (split ':')[3]; # I only need field number 4. So why store
the array?

M.J. Pieters, Web Developer
| Audax Tros MultiMedia http://www.atmm.nl
| Tel: +31-35-6254545 Fax: +31-35-6254555
| mailto:mj@atmm.nl http://www.atmm.nl/~mj
 ------------------------------------------




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

Date: Thu, 19 Feb 1998 10:20:06 -0500
From: jdf@pobox.com (Jonathan Feinberg)
Subject: Re: Read the FAQ ...need milliseconds
Message-Id: <MPG.f5617adff0a404498970a@news.concentric.net>

dmeyer9@ix.netcom.com said...
: I read the FAQ and was disappointed that 
: milliseconds are not available unless you
: have 'sys/syscall' and 'gettimeofday'. 
: Unfortunately, I do not.

You don't specify why it is that you lack these system functions.  Are you on 
a Win32 box?  I believe there are modules that give you access to the Win32 
API, among which there are probably some handy high-res time functions.  But 
this is just off the top of my head.

-- 
#!/usr/bin/perl -w -- Just another Perl hacker,
 (open 0),$_=<0>,s,.*-+ ,,,chop;for(split?@*?){($$_++or$}=$_,y,
 y \,y,<STDIN>,,eval"sub $_ {print'$}'}"),y,} \,},>STDOUT,,&$_}
# Jonathan Feinberg    jdf@pobox.com    Sunny Brooklyn, NY


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

Date: 19 Feb 1998 16:23:52 GMT
From: klassa@aursgh.aur.alcatel.com (John Klassa)
Subject: Re: Read the FAQ ...need milliseconds
Message-Id: <6chmao$g2j$1@aurwww.aur.alcatel.com>

On 19 Feb 1998 14:17:42 GMT, David J Meyer <dmeyer9@ix.netcom.com> wrote:
->I read the FAQ and was disappointed that 
->milliseconds are not available unless you
->have 'sys/syscall' and 'gettimeofday'. 
->Unfortunately, I do not.
->
->Does anyone have any other suggestions?  I
->really need milliseconds bad.

Do you want the ability to time something in millisecond resolution,
or to pause for some number of milliseconds?  If the later, try:

	perldoc -f select

-- 
John Klassa / Alcatel Telecom / Raleigh, NC, USA <><


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

Date: 19 Feb 1998 16:52:39 GMT
From: dmeyer9@ix.netcom.com (David J Meyer)
Subject: Re: Read the FAQ ...need milliseconds
Message-Id: <dmeyer9-1902981152510001@ftl-fl5-24.ix.netcom.com>

In article <dmeyer9-1902980919310001@ftl-fl6-24.ix.netcom.com>,
dmeyer9@ix.netcom.com (David J Meyer) wrote:

Folks,

I am benchmarking SQL insert rates into an Infomix
database running under AIX 4.14. I need to measure
in milliseconds from after I connect to the database
and after the INSERT statement completes.

Sorry for the 'cloudy' question.

David Meyer
Guerilla Software


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

Date: Thu, 19 Feb 1998 12:20:03 -0500
From: Douglas Clifton <doug@weboneinc.com>
Subject: rename error (Cross-device link)
Message-Id: <34EC69C3.6F84384F@weboneinc.com>

I had trouble finding an appropriate c.o.linux
news group to post this message, so I thought
I might try here.

OS: Linux 2.0.33
Perl: 5.003
Arch: Intel Pentium w/ SCSI HDD

When trying to rename (back-up) a file on the
same HD, same partition same filesystem and
same directory `rename' dies with:

Cross-device link # errno EXDEV

Works fine from the command line.

Any ideas? Permissions are not the problem.

TIA

-- 
Douglas Clifton
Unix/C/Perl/CGI/HTML Programmer
doug@weboneinc.com

===================
Web One Inc.
Website Development
Phone: 888-699-WEB1
Phone: 616-552-9999
Fax:   616-552-9920
sales@weboneinc.com
www.weboneinc.com
===================


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

Date: Thu, 19 Feb 1998 12:17:36 -0500
From: Douglas Clifton <doug@weboneinc.com>
Subject: rename error (Cross-device link)
Message-Id: <34EC692F.DB4139F0@weboneinc.com>

I had trouble finding an appropriate c.o.linux
news group to post this message, so I thought
I might try here.

OS: Linux 2.0.33
Perl: 5.003
Arch: Intel Pentium w/ SCSI HDD

When trying to rename (back-up) a file on the
same HD, same partition same filesystem and
same directory `rename' dies with:

Cross-device link # errno EXDEV

Any ideas? Permissions are not the problem.

TIA

-- 
Douglas Clifton
Unix/C/Perl/CGI/HTML Programmer
doug@weboneinc.com

===================
Web One Inc.
Website Development
Phone: 888-699-WEB1
Phone: 616-552-9999
Fax:   616-552-9920
sales@weboneinc.com
www.weboneinc.com
===================


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

Date: Thu, 19 Feb 1998 12:29:07 -0500
From: Douglas Clifton <doug@weboneinc.com>
Subject: Re: rename error: please disregard
Message-Id: <34EC6BE3.8C5C5AAB@weboneinc.com>

Please disregard, typo in my code :(

-- 
Douglas Clifton
Unix/C/Perl/CGI/HTML Programmer
doug@weboneinc.com

===================
Web One Inc.
Website Development
Phone: 888-699-WEB1
Phone: 616-552-9999
Fax:   616-552-9920
sales@weboneinc.com
www.weboneinc.com
===================


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

Date: Thu, 19 Feb 1998 10:17:51 -0500
From: jdf@pobox.com (Jonathan Feinberg)
Subject: Re: Taint / exec / stderr
Message-Id: <MPG.f56172ab767056d989709@news.concentric.net>

  [courtesy cc of this posting sent to cited author via email]

deviss@cisa.bt.co.uk said...
: >I'm trying to ensure my cgi is secure (ish) by using the -T option and
: >using exec to run system commands. The problem is that I can't figure
: >out how to detect if the exec'd command has failed, and then how to
: >collect any output from stderr.

You are to be commended for security-consciousness and for searching the docs 
for your answers.  You just need to learn how to use your documentation a 
little better.  You'll want to search your perl documentation for keywords 
that match the concept you're looking for.  On a Unix-like system, you'll use 
the grep command to search your pod directory; on a Win32 box, the builtin 
Find Files program is adequate.  Here are some relevant docs:

perlsec
perlfaq3 - "Where can I learn about CGI or Web programming in Perl?"

-- 
#!/usr/bin/perl -w -- Just another Perl hacker,
 (open 0),$_=<0>,s,.*-+ ,,,chop;for(split?@*?){($$_++or$}=$_,y,
 y \,y,<STDIN>,,eval"sub $_ {print'$}'}"),y,} \,},>STDOUT,,&$_}
# Jonathan Feinberg    jdf@pobox.com    Sunny Brooklyn, NY


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

Date: Thu, 19 Feb 1998 18:57:21 +0200
From: yuval yosef <yosefy@iil.intel.com>
Subject: Win32::AdminMisc::UserGetMiscAttributes - help- Requested Example!!
Message-Id: <34EC6470.ACDADEEA@iil.intel.com>

Hello all!

I've installed AdminMisc Module ver 971022, I looked the documentation
@www.roth.net but some how while the documents state that the use is:

            %Hash = UserGetMiscAttributes($Domain, $User) ;

I get this form shell:

            Usage: NT::AdminMisc::UserGetMiscAttributes($Domain, $User,
\%Attribs) ;

I replaced NT with Win32, but still getting an undef!!!

Help!!!

Thanks,

                                      Yuval



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

Date: Thu, 19 Feb 1998 15:19:07 GMT
From: Charles Margolin <cmargoli@world.northgrum.com>
Subject: Re: Writing a "println" function that works just like "print"
Message-Id: <34EC4D6B.6F68@world.northgrum.com>

Mohamed Hendawi wrote:
> 
> I would like to implement a simple function "println" that works
> exactly like the built-in perl print function, except that it appends
> a newline to the printed output.  I could use a simple subroutine to
> do this, but then I would not be able to specify filehandles the same
> way you can with print.   I want the exact same "indirect object" method
> of invocation for the "println" method:
> 
>   println "foo";
>   println STDERR "foo";
> 

An alternative approach:  either execute perl with the -l switch
or set the $\ variable.  These will default the output record
separator to a newline whenever you use print.

NOTE:  This newsgroup, 'comp.lang.perl', has been defunct for years and
many sites do not even receive it.  Please post to 'comp.lang.perl.misc'
instead.  There you will find hundreds of postings each week and many
more people who read them.

-- 
Charles G. Margolin                   DSSD Internal Information Services
cmargoli@world.northgrum.com          Northrop Grumman Corp. 0624/23
margolin@acm.org                      Hawthorne, California 90250-3277


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

Date: 19 Feb 1998 17:18:18 GMT
From: "Karl Stenerud" <billgates@microsoft.com>
Subject: Re: Year 2000 Compliance: Lawyers, Liars, and Perl
Message-Id: <01bd3d59$da86e860$7e13f28a@bm.mdsi.bc.ca>

RandallBart <Barticus@worldnet.att.spam.net> wrote in article
<6cgk2a$d41@bgtnsc03.worldnet.att.net>...
> 64 bits of seconds will hold the known age of the universe.  That's a
> design limitation I can live with.

To what? a few paltry hundred billion years?
Are you daft, man?
That's not nearly enough! =)


Ti----iime is on my side...



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

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 1932
**************************************

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